https://github.com/0pkunal/compound-interest-calculator-in-python
A simple Python program to calculate Compound Interest (CI) and the Total Amount (A) after a given time period
https://github.com/0pkunal/compound-interest-calculator-in-python
python python-3 python3
Last synced: 9 months ago
JSON representation
A simple Python program to calculate Compound Interest (CI) and the Total Amount (A) after a given time period
- Host: GitHub
- URL: https://github.com/0pkunal/compound-interest-calculator-in-python
- Owner: 0PKunal
- License: mit
- Created: 2025-08-31T00:03:46.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-08-31T00:09:54.000Z (9 months ago)
- Last Synced: 2025-08-31T02:28:18.901Z (9 months ago)
- Topics: python, python-3, python3
- Language: Python
- Homepage:
- Size: 1.95 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 Calculator
A simple Python program to calculate **Compound Interest (CI)** and the **Total Amount (A)** after a given time period.
## Formula
$$
A = P \times \left(1 + \frac{r}{100}\right)^t
$$
- **P** = Principal Amount (Initial Investment)
- **r** = Annual Rate of Interest (in %)
- **t** = Time (in years)
- **A** = Total Amount after time *t*
- **I = A - P** (Compound Interest)
## Usage
1. Clone the repository:
```bash
git clone https://github.com/0PKunal/Compound-Interest-Calculator-in-Python.git
```
2. Navigate into the folder:
```bash
cd /Compound-Interest-Calculator-in-Python
```
3. Run the script:
```bash
python compound_interest.py
```
## Example
```
Enter the principal amount(P): 1234
Enter the interest rate(r in %): 12.34
Enter the time(t in years): 12
Compound Interest(I) = 3751.72
Total AMount (A) after (t) years = 4985.72
```
## File
* `compound_interest.py` → Main program
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
```
MIT License
Copyright (c) 2025 0PKunal
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
```
---