# Investment calculator

Estimate compound investment growth with an initial balance, monthly contributions, annual return, and time horizon. Edit every assumption and see the formula.

[Home](https://calcul.io/index.md)

## Investment calculator

Explore how an initial investment and regular monthly contributions could grow over time. Change the assumed annual return and number of years to compare your own scenarios.

Edit any line below. Results update as you type. Use the same currency for all monetary amounts.

```calculio
initial = 10000
monthlyContribution = 200
annualReturn = 5%
years = 20
months = years * 12
monthlyRate = annualReturn / 12
growth = (1 + monthlyRate) ^ months
futureValue = monthlyRate == 0 ? initial + monthlyContribution * months : initial * growth + monthlyContribution * (growth - 1) / monthlyRate
contributions = initial + monthlyContribution * months
gain = futureValue - contributions
```

[Open in full calculator](/app/?c=initial%20%3D%2010000~monthlyContribution%20%3D%20200~annualReturn%20%3D%205%25~years%20%3D%2020~months%20%3D%20years%20*%2012~monthlyRate%20%3D%20annualReturn%20%2F%2012~growth%20%3D%20(1%20%2B%20monthlyRate)%20%5E%20months~futureValue%20%3D%20monthlyRate%20%3D%3D%200%20%3F%20initial%20%2B%20monthlyContribution%20*%20months%20%3A%20initial%20*%20growth%20%2B%20monthlyContribution%20*%20(growth%20-%201)%20%2F%20monthlyRate~contributions%20%3D%20initial%20%2B%20monthlyContribution%20*%20months~gain%20%3D%20futureValue%20-%20contributions)

## How compound investment growth works

The starting balance compounds each month. Monthly contributions are added at the end of each month, so earlier contributions have more time to grow. Total contributions include the initial balance and every monthly deposit; the estimated gain is the future value minus those contributions.

## Assumptions and limits

The annual return is a hypothetical nominal rate divided by 12, with monthly compounding. Returns are not guaranteed or constant in practice. This estimate excludes fees, taxes, and inflation. Use a positive time horizon and an annual rate greater than -1200% so the monthly growth factor remains positive.

## What happens if the return is zero?

With a zero return, the future value equals the initial balance plus all monthly contributions. The worksheet handles this case without dividing by zero.

## Related calculators and examples

- [Investment portfolio example](https://calcul.io/examples/portfolio/index.md)
- [Plan monthly contributions with a budget](https://calcul.io/examples/monthly-budget/index.md)
- [Compare mortgage repayments](https://calcul.io/mortgage-calculator/index.md)
- [Compare future purchasing power](https://calcul.io/inflation-calculator/index.md)
- [Plan monthly savings](https://calcul.io/savings-goal-calculator/index.md)

New to editable calculations? [Learn how to use variables and formulas](https://calcul.io/instructions/index.md).
