复利计算器
直观展示复利增长曲线,支持定期追加投入,逐年明细一目了然。
参数设置
初始本金
$
年化收益率
标普500历史年均约10%,通胀调整后约7%%
投资年限
年
复利频率
定期追加投入
$/ 月
最终金额
$292.5K
20 年
总本金
$130.0K
总收益
$162.5K
+125.0%
增长曲线
逐年明细
| 年份 | 本金 | 收益 | 总额 |
|---|---|---|---|
| 1 | $16.0K | $890.00 | $16.9K |
| 2 | $22.0K | $2,263.00 | $24.3K |
| 3 | $28.0K | $4,151.00 | $32.2K |
| 4 | $34.0K | $6,592.00 | $40.6K |
| 5 | $40.0K | $9,623.00 | $49.6K |
| 6 | $46.0K | $13.3K | $59.3K |
| 7 | $52.0K | $17.6K | $69.6K |
| 8 | $58.0K | $22.7K | $80.7K |
| 9 | $64.0K | $28.5K | $92.5K |
| 10 | $70.0K | $35.2K | $105.2K |
| 11 | $76.0K | $42.8K | $118.8K |
| 12 | $82.0K | $51.3K | $133.3K |
| 13 | $88.0K | $60.8K | $148.8K |
| 14 | $94.0K | $71.4K | $165.4K |
| 15 | $100.0K | $83.1K | $183.1K |
| 16 | $106.0K | $96.2K | $202.2K |
| 17 | $112.0K | $110.5K | $222.5K |
| 18 | $118.0K | $126.3K | $244.3K |
| 19 | $124.0K | $143.5K | $267.5K |
| 20 | $130.0K | $162.5K | $292.5K |
这个工具有帮到你吗?
代码示例
JavaScript
// Compound interest with monthly contributions
function compoundGrowth(P, r, n, t, pmt) {
// P = principal, r = annual rate (decimal)
// n = compounds/year, t = years, pmt = monthly contrib
const monthlyRate =
Math.pow(1 + r / n, n / 12) - 1;
let balance = P;
for (let y = 1; y <= t; y++) {
for (let m = 0; m < 12; m++) {
balance *= (1 + monthlyRate);
balance += pmt;
}
}
return balance;
}
// Example: $10k at 7%, 20 years, $500/mo
console.log(compoundGrowth(10000, 0.07, 1, 20, 500));
// → ~$284,428Python
def compound_growth(P, r, n, t, pmt=0):
"""
P = initial principal
r = annual rate (decimal, e.g. 0.07)
n = compounding frequency per year
t = years
pmt = monthly contribution
"""
monthly_rate = (1 + r / n) ** (n / 12) - 1
balance = P
for _ in range(t * 12):
balance *= (1 + monthly_rate)
balance += pmt
return balance
# $10,000 at 7% for 20 years + $500/mo
print(f"USD {compound_growth(10000, 0.07, 1, 20, 500):,.2f}")
# → USD 284,428.09Excel / Google Sheets
// Future Value formula (no contributions) =FV(rate/n, n*t, 0, -PV) // With monthly contributions (monthly compounding) // pmt = monthly payment, rate = annual rate =FV(rate/12, years*12, -pmt, -PV) // Example: $10k principal, 7% rate, 20 years // with $500/month contribution: =FV(7%/12, 20*12, -500, -10000) // → $284,428.09 // Rule of 72 — years to double: =72 / (rate * 100)
Go
package main
import (
"fmt"
"math"
)
func compoundGrowth(P, r float64, n, t int, pmt float64) float64 {
monthlyRate := math.Pow(1+r/float64(n), float64(n)/12) - 1
balance := P
for i := 0; i < t*12; i++ {
balance *= (1 + monthlyRate)
balance += pmt
}
return balance
}
func main() {
result := compoundGrowth(10000, 0.07, 1, 20, 500)
fmt.Printf("$%.2f\n", result) // $284,428.09
}常见问题
什么是复利?
复利是指不仅对本金计息,还对之前积累的利息再次计息,随时间推移产生指数级增长。爱因斯坦称之为「世界第八大奇迹」,坚持长期投资的关键就在于让复利充分发挥作用。
复利频率越高越好吗?
在相同名义年利率下,复利频率越高,实际年化收益率(APY)越高,但差距通常很小。从每年复利改为每日复利,实际效果提升非常有限,远不如提高收益率或延长投资年限重要。
年化收益率设多少合理?
标普500指数历史年均收益约10%(名义),扣除通胀后约7%。偏保守估算可用5–6%;债券或储蓄类资产一般在2–4%。切勿使用过于乐观的假设,合理的预期更有参考价值。
每月定投是如何计算的?
每月定投采用「普通年金终值」公式,即每月月末追加一笔资金,并在次月开始享受复利。本计算器采用月度模拟的方式逐月计算,精度较高,适合实际规划参考。
为什么前几年增长很慢?
复利是指数增长,初期主要是本金积累,收益占比小;进入中后期后,每年产生的利息可能超过当年新追加的本金。这也是「越早投资越好」的根本原因——时间是复利最重要的变量。
什么是72法则?
用72除以年化收益率,即可估算资产翻倍所需年数。例如年化7%,72÷7≈10.3年翻倍;年化10%约需7.2年。这是快速心算复利威力的经典公式,无需计算器即可使用。