https://github.com/kahlym/compound-interest
Angular application that calculates compound interest and displays output given various input through a material UI.
https://github.com/kahlym/compound-interest
angular compound-interest
Last synced: 2 months ago
JSON representation
Angular application that calculates compound interest and displays output given various input through a material UI.
- Host: GitHub
- URL: https://github.com/kahlym/compound-interest
- Owner: KAHLYM
- License: mit
- Created: 2020-10-09T11:43:42.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-14T17:22:30.000Z (over 5 years ago)
- Last Synced: 2025-01-15T04:39:16.154Z (over 1 year ago)
- Topics: angular, compound-interest
- Language: TypeScript
- Homepage:
- Size: 185 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Compound Interest
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.20.
## Calculation Method
### Input
| Name | Description |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Principal | Amount of money that you have available to invest initially |
| Contribution (Monthly) | Amount that you plan to add to the principal every month, or a negative number for the amount that you plan to withdraw every month |
| Interest Rate | Estimated annual interest rate |
| Iterations | Length of time, in years, that you plan to save |
| Iteration (Offset) | Initial number to increment (with respect to Iterations) |
### Method
The amount is calculated through incremental interation that uses the previous amount. The code that calculates the amount is detailed below. The other aspects displayed in the table are calculated after the initial calculation. Contributions are added at the beginning of the calculation. Interest occurs annually.
for (var iteration: number = 0; iteration < this.iterations; iteration++) {
var amount: number = (amount + this.contribution) * (1 + (this.interest_rate * 0.01));
see [calculator.service.ts](https://github.com/KAHLYM/compound-interest/blob/main/src/app/service/calculator.service.ts)
### Output
* Year
* Offset
* Yearly Interest
* Total Interest
* Total Deposits
* Balance
## Export to CSV
There exists the ability to export the tabulated results to a CSV file through the menu (located in the top-right of the Tabulated Results card).