Skip to content

Commit

Permalink
Added FD-Calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurobinda-Chainy committed Feb 18, 2025
1 parent 11c990a commit 309cfe1
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Fintech Projects/11-FD-CALCULATOR/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# FD Calculator 💰

A simple Fixed Deposit (FD) calculator that helps users calculate the maturity amount of their investment.

## 🚀 Features
- Input principal amount, interest rate, and tenure.
- Calculates maturity amount based on compound interest.
- Simple and user-friendly UI.


## 🛠️ Technologies Used
- HTML
- CSS
- JavaScript

## 📌 How to Use
1. Clone this repository:
```bash
git clone https://github.com/your-username/FD-Calculator.git
30 changes: 30 additions & 0 deletions Fintech Projects/11-FD-CALCULATOR/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FD Calculator</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>FD Calculator</h1>
<div class="form-group">
<label for="principle">Principle Amount</label>
<input type="number" id="principle" placeholder="Enter the principle Amount">
</div>
<div class="form-group">
<label for="interestRate">Interest Rate</label>
<input type="number" id="interestRate" placeholder="Enter the Interest Rate">
</div>
<div class="form-group">
<label for="principle">Tenure (in years):</label>
<input type="number" id="tenure" placeholder="Enter tenure in Years">
</div>
<button id="calculateBtn" class="calculate-btn">Calculate</button>
<p id="result" class="result">Maturity Amount</p>
</div>

<script src="script.js"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions Fintech Projects/11-FD-CALCULATOR/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function calculateMaturityAmount(){
// Get input values from the form elements

const principle = parseFloat(document.getElementById('principle').value);
const interestRate = parseFloat(document.getElementById('interestRate').value);
const tenure = parseFloat(document.getElementById('tenure').value);

// Perform the calculation

const maturityAmount = principle + (principle * interestRate * tenure)/100;

// Display tehe result
document.getElementById('result').innerText = `Maturity Amount: ${maturityAmount.toFixed(2)}`;
}

// Attach the event listener to the calculate Button

document.getElementById('calculateBtn').addEventListener('click', calculateMaturityAmount);
65 changes: 65 additions & 0 deletions Fintech Projects/11-FD-CALCULATOR/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
body{
font-family: Arial, sans-serif;
background-color: #f2f2f2;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

.container{
background-color: #ffffffff;
border-radius: 5px;
padding: 20px;
box-shadow: 0px 0px 2px rgba(198, 193, 193, 0.1);
max-width: 400px;
}
.container:hover{
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1);
}

h1{
font-size: 24px;
text-align: center;
text-decoration: underline;
margin-bottom: 20px;
}

.form-group{
margin-bottom: 10px;
}

.form-group label{
display: block;
font-weight: bold;
margin-bottom: 5px;
}

.form-group input{
width:96%;
padding: 10px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 5px;
}

.result{
font-size: 18px;
text-align:center;
margin-top: 10px;
}

.calculate-btn{
padding: 10px 20px;
background-color: #2979FF;
color: #fff;
font-weight: bolder;
border-radius: 5px;
cursor: pointer;
display: flex;
/* justify-content: center; */
margin: 0 auto;
}
.calculate-btn:hover{
background-color: #448AFF;
}

0 comments on commit 309cfe1

Please sign in to comment.