https://github.com/shuque/retirement_balance
Retirement balance calculator
https://github.com/shuque/retirement_balance
Last synced: about 1 year ago
JSON representation
Retirement balance calculator
- Host: GitHub
- URL: https://github.com/shuque/retirement_balance
- Owner: shuque
- License: mit
- Created: 2025-05-25T15:58:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-25T16:03:23.000Z (about 1 year ago)
- Last Synced: 2025-05-25T17:19:47.239Z (about 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# retirement_balance
Retirement balance calculator
This program was generated by Cursor AI in response to my prompts (based
on other retirement calculator scripts I've written for myself in the
past).
## Usage
```
usage: retirement_balance.py [-h] --current-age CURRENT_AGE --final-age
FINAL_AGE --current-balance CURRENT_BALANCE
--yearly-contribution YEARLY_CONTRIBUTION
--yearly-return YEARLY_RETURN --retirement-age
RETIREMENT_AGE --withdrawal-rate WITHDRAWAL_RATE
--retirement-return RETIREMENT_RETURN --tax-rate
TAX_RATE --withdrawal-increase
WITHDRAWAL_INCREASE
Calculate retirement balance projections
optional arguments:
-h, --help show this help message and exit
--current-age CURRENT_AGE
Current age
--final-age FINAL_AGE
Target final age for projections
--current-balance CURRENT_BALANCE
Current retirement account balance
--yearly-contribution YEARLY_CONTRIBUTION
Amount contributed per year
--yearly-return YEARLY_RETURN
Expected yearly return rate during accumulation as a
percentage (e.g., 7 for 7%)
--retirement-age RETIREMENT_AGE
Age at which to start withdrawals
--withdrawal-rate WITHDRAWAL_RATE
Annual withdrawal rate as a percentage (e.g., 4 for
4%)
--retirement-return RETIREMENT_RETURN
Expected yearly return rate during retirement as a
percentage (e.g., 4 for 4%)
--tax-rate TAX_RATE Tax rate on withdrawals as a percentage (e.g., 22 for
22%)
--withdrawal-increase WITHDRAWAL_INCREASE
Annual increase in withdrawal amount as a percentage
(e.g., 2 for 2%)
```
## Sample Output
```
$ ./retirement_balance.py --current-age 30 --final-age 95 --current-balance 100000 --yearly-contribution 20000 --yearly-return 7 --retirement-age 65 --withdrawal-rate 4 --retirement-return 4 --tax-rate 22 --withdrawal-increase
Retirement Balance Projections:
Current Age: 30
Final Age: 95
Current Balance: $100,000.00
Yearly Contribution: $20,000.00
Yearly Return: 7.0%
Retirement Age: 65
Withdrawal Rate: 4.0%
Retirement Return: 4.0%
Tax Rate: 22.0%
Withdrawal Increase: 2.0%
Age Balance Yearly Monthly After Tax
----------------------------------------------------------------------
30 $ 100,000.00 $ 0.00 $ 0.00 $ 0.00
31 $ 128,400.00 $ 0.00 $ 0.00 $ 0.00
32 $ 158,788.00 $ 0.00 $ 0.00 $ 0.00
33 $ 191,303.16 $ 0.00 $ 0.00 $ 0.00
34 $ 226,094.38 $ 0.00 $ 0.00 $ 0.00
35 $ 263,320.99 $ 0.00 $ 0.00 $ 0.00
36 $ 303,153.46 $ 0.00 $ 0.00 $ 0.00
37 $ 345,774.20 $ 0.00 $ 0.00 $ 0.00
38 $ 391,378.39 $ 0.00 $ 0.00 $ 0.00
39 $ 440,174.88 $ 0.00 $ 0.00 $ 0.00
40 $ 492,387.12 $ 0.00 $ 0.00 $ 0.00
41 $ 548,254.22 $ 0.00 $ 0.00 $ 0.00
42 $ 608,032.02 $ 0.00 $ 0.00 $ 0.00
43 $ 671,994.26 $ 0.00 $ 0.00 $ 0.00
44 $ 740,433.86 $ 0.00 $ 0.00 $ 0.00
45 $ 813,664.23 $ 0.00 $ 0.00 $ 0.00
46 $ 892,020.72 $ 0.00 $ 0.00 $ 0.00
47 $ 975,862.17 $ 0.00 $ 0.00 $ 0.00
48 $ 1,065,572.52 $ 0.00 $ 0.00 $ 0.00
49 $ 1,161,562.60 $ 0.00 $ 0.00 $ 0.00
50 $ 1,264,271.98 $ 0.00 $ 0.00 $ 0.00
51 $ 1,374,171.02 $ 0.00 $ 0.00 $ 0.00
52 $ 1,491,762.99 $ 0.00 $ 0.00 $ 0.00
53 $ 1,617,586.40 $ 0.00 $ 0.00 $ 0.00
54 $ 1,752,217.45 $ 0.00 $ 0.00 $ 0.00
55 $ 1,896,272.67 $ 0.00 $ 0.00 $ 0.00
56 $ 2,050,411.76 $ 0.00 $ 0.00 $ 0.00
57 $ 2,215,340.58 $ 0.00 $ 0.00 $ 0.00
58 $ 2,391,814.42 $ 0.00 $ 0.00 $ 0.00
59 $ 2,580,641.43 $ 0.00 $ 0.00 $ 0.00
60 $ 2,782,686.33 $ 0.00 $ 0.00 $ 0.00
61 $ 2,998,874.37 $ 0.00 $ 0.00 $ 0.00
62 $ 3,230,195.58 $ 0.00 $ 0.00 $ 0.00
63 $ 3,477,709.27 $ 0.00 $ 0.00 $ 0.00
64 $ 3,742,548.92 $ 0.00 $ 0.00 $ 0.00
65 $ 3,864,890.25 $161,037.09 $ 13,419.76 $ 10,467.41
66 $ 3,855,228.03 $164,257.84 $ 13,688.15 $ 10,676.76
67 $ 3,841,894.15 $167,542.99 $ 13,961.92 $ 10,890.29
68 $ 3,824,676.07 $170,893.85 $ 14,241.15 $ 11,108.10
69 $ 3,803,351.38 $174,311.73 $ 14,525.98 $ 11,330.26
70 $ 3,777,687.47 $177,797.96 $ 14,816.50 $ 11,556.87
71 $ 3,747,441.05 $181,353.92 $ 15,112.83 $ 11,788.01
72 $ 3,712,357.69 $184,981.00 $ 15,415.08 $ 12,023.77
73 $ 3,672,171.38 $188,680.62 $ 15,723.39 $ 12,264.24
74 $ 3,626,604.00 $192,454.23 $ 16,037.85 $ 12,509.53
75 $ 3,575,364.84 $196,303.32 $ 16,358.61 $ 12,759.72
76 $ 3,518,150.05 $200,229.39 $ 16,685.78 $ 13,014.91
77 $ 3,454,642.07 $204,233.97 $ 17,019.50 $ 13,275.21
78 $ 3,384,509.11 $208,318.65 $ 17,359.89 $ 13,540.71
79 $ 3,307,404.44 $212,485.03 $ 17,707.09 $ 13,811.53
80 $ 3,222,965.90 $216,734.73 $ 18,061.23 $ 14,087.76
81 $ 3,130,815.11 $221,069.42 $ 18,422.45 $ 14,369.51
82 $ 3,030,556.91 $225,490.81 $ 18,790.90 $ 14,656.90
83 $ 2,921,778.56 $230,000.62 $ 19,166.72 $ 14,950.04
84 $ 2,804,049.06 $234,600.64 $ 19,550.05 $ 15,249.04
85 $ 2,676,918.38 $239,292.65 $ 19,941.05 $ 15,554.02
86 $ 2,539,916.61 $244,078.50 $ 20,339.88 $ 15,865.10
87 $ 2,392,553.20 $248,960.07 $ 20,746.67 $ 16,182.40
88 $ 2,234,316.05 $253,939.27 $ 21,161.61 $ 16,506.05
89 $ 2,064,670.63 $259,018.06 $ 21,584.84 $ 16,836.17
90 $ 1,883,059.04 $264,198.42 $ 22,016.54 $ 17,172.90
91 $ 1,688,899.01 $269,482.39 $ 22,456.87 $ 17,516.36
92 $ 1,481,582.93 $274,872.04 $ 22,906.00 $ 17,866.68
93 $ 1,260,476.77 $280,369.48 $ 23,364.12 $ 18,224.02
94 $ 1,024,918.97 $285,976.87 $ 23,831.41 $ 18,588.50
95 $ 774,219.33 $291,696.41 $ 24,308.03 $ 18,960.27
```