A library of Canadian 🇨🇦 personal finance calculations written in Go.
This is work in progress.
- assert - Helpful functions for testing
- float - Helpful functions for working with floating point numbers
- mortgage - Canadian mortgage calculations
-
MortgagePayment
calculation - Amortization schedule
- Lump sum payments
-
- taxes - Income tax calculations
- Very basic
IncomeTax
andGrossIncomeForNet
calculations. - Tax brackets
- Provinces and Territories other than Alberta
- RRSP deduction calculations for contributions
- Maybe CPP/EI calculations
- Maybe self-employment vs. employment income
- Maybe capital gains (in taxable accounts)
- Maybe eligible and ineligible dividends (in taxable accounts)
- Very basic
- rrsp
- RRSP withholding tax for withdrawals
- RRSP contribution room calculations -- how many years to "max" it out?
- fi - Financial Independence calculations
- The 4% rule
- Coast FI calculator
- Survival threshold from Die With Zero
- compound -- compound interest and drawdown calculators
- Compound interest calculator for accumulation phase
- Drawdown calculator
- Maybe drawdown with CPP/OAS at different ages
There are some other calculations that may be interesting.
- Foreign withholding tax for dividends from U.S. and International equity
- T-Rex Scores (by Larry Bates) to compare fees on various investments, such as Management Expense Ratios (MER)
- Other suggestions?
The documentation is intended to describe how to use the functions in this library.
It is not financial advice.
Please open an issue to propose a change or addition before opening a pull request.
Please do NOT include personal information, financial or otherwise, in the code or examples. All numbers should be fictional.
- Mortgage Calculator by the Government of Canada
- Income Tax Calculator by Wealthsimple
- Compound Interest Calculator by Get Smarter About Money (Ontario Securities Commission)
- A Guide to Canadian Mortgage Calculations (with code) by Mike Sukmanowsky