Compound Interest Calculator
Simulate monthly contributions with Brazilian regressive income tax and inflation, compared with savings and CDI — what matters is the real value, in today's money.
The link keeps what is on screen.
You will have, after tax and inflationR$ 149.811Net amount: R$ 234.439 · Possible monthly income (4% rule): R$ 499
- Total contributedR$ 130.000
- Interest earnedR$ 122.989
- Income tax on withdrawalR$ 18.549
Show year-by-year table
| Year | Contributions | Interest | Gross balance |
|---|---|---|---|
| 1 | R$ 22.000,00 | R$ 1.846,50 | R$ 23.846,50 |
| 2 | R$ 34.000,00 | R$ 5.354,58 | R$ 39.354,58 |
| 3 | R$ 46.000,00 | R$ 10.723,62 | R$ 56.723,62 |
| 4 | R$ 58.000,00 | R$ 18.176,96 | R$ 76.176,96 |
| 5 | R$ 70.000,00 | R$ 27.964,69 | R$ 97.964,69 |
| 6 | R$ 82.000,00 | R$ 40.366,95 | R$ 122.366,95 |
| 7 | R$ 94.000,00 | R$ 55.697,48 | R$ 149.697,48 |
| 8 | R$ 106.000,00 | R$ 74.307,68 | R$ 180.307,68 |
| 9 | R$ 118.000,00 | R$ 96.591,09 | R$ 214.591,09 |
| 10 | R$ 130.000,00 | R$ 122.988,52 | R$ 252.988,52 |
Variables used in the calculation
Indicators (Central Bank of Brazil)
- CDI
- 13.65% a.a. SGS 4389 as of 10/21/2026
- Savings account (poupança)
- 8.2% a.a. (0.659% a.m.) SGS 195 as of 10/21/2026
- Expected inflation (IPCA)
- 4.58% a.a. SGS 13522 as of 9/1/2026
Central Bank data updated on 10/22/2026.
Official rules and tables
- Fixed income tax (regressive)
- 22,5% → 20% → 17,5% → 15% · Lei 11.033/2004
- Sustainable withdrawal
- 4% a.a.
Compare with
- Your investmentR$ 149.811In today's moneyNet amount: R$ 234.439
- SavingsR$ 130.344In today's moneyNet amount: R$ 203.975
- 100% of CDIR$ 163.399In today's moneyNet amount: R$ 255.703
How is it calculated?
Annual rates are effective: the monthly rate is (1 + annual)^(1/12) − 1, and each contribution lands at the end of the month. Income tax follows the regressive table (22.5% up to 6 months, 20% up to 1 year, 17.5% up to 2 years, 15% above), computed per contribution since each has its own holding period. The real value divides the net balance by cumulative inflation. Management and custody fees are not included.
See the code ↗Processed in your browser; nothing is sent.
⌨️ Use from the terminal (JSON)
This tool also runs outside the site: the cli.js script uses the same logic as this page and returns the result as JSON. Parameters are the same as this page's URL — copy the command below with the values on screen.
Deno
deno run -q "https://thecodecodex.com/cli.js?tool=compound-interest"
Node.js / Bun
curl -s https://thecodecodex.com/cli.js | node --input-type=module - compound-interest inicial=…
| Parameter | Description | Default |
|---|---|---|
| inicial | depósito inicial | 10000 |
| aporte | aporte mensal | 1000 |
| anos | prazo em anos | 10 |
| taxa | rentabilidade anual efetiva (fração) | 0.12 |
| ir | 0 = sem IR | 1 |
| ipca | inflação anual (fração) | IPCA 12m do BCB |
| poupanca | poupança anual (fração) | poupança do BCB |
| cdi | CDI anual (fração) | CDI do BCB |
Requires Deno, Node.js or Bun. With Deno the script runs with no permissions: it cannot read files or access the network. Central Bank indicators are from the day the site was published.