A Certificate of Deposit (CD) is a savings product offered by banks and credit unions that provides a fixed interest rate for a specified term. CDs are a popular choice for individuals looking for a low-risk investment with predictable returns. The primary appeal of a CD lies in its security; your principal is typically FDIC-insured (up to the legal limits), and the interest rate is guaranteed for the duration of the term.
How CD Earnings are Calculated
The earnings on a CD are determined by a combination of factors: the principal amount (your initial deposit), the annual interest rate, the term length of the CD, and the compounding frequency. Compounding is the process where interest earned is added to the principal, and subsequent interest is calculated on this new, larger amount. The more frequently interest compounds, the higher your effective yield will be over time.
The formula used in this calculator for compound interest is:
A = P (1 + r/n)^(nt)
Where:
A = the future value of the investment/loan, including interest
P = the principal investment amount (the initial deposit)
r = the annual interest rate (as a decimal)
n = the number of times that interest is compounded per year
t = the time the money is invested or borrowed for, in years
To calculate the earnings, we subtract the principal amount (P) from the future value (A): Earnings = A – P.
Key Inputs Explained:
Deposit Amount (Principal): This is the initial sum of money you invest in the CD.
Annual Interest Rate (%): The stated yearly rate of return on your deposit. For calculation, this is converted to a decimal (e.g., 4.5% becomes 0.045).
CD Term (Months): The duration for which your money will be held in the CD. This is converted into years for the compound interest formula (e.g., 12 months = 1 year, 18 months = 1.5 years).
Compounding Frequency (per year): How often the interest is calculated and added to your principal. Common frequencies include:
Annually (n=1)
Semi-annually (n=2)
Quarterly (n=4)
Monthly (n=12)
Daily (n=365)
When to Use This Calculator:
This calculator is ideal for anyone considering opening a CD. It helps you:
Compare potential returns from different CDs with varying rates and terms.
Understand the impact of compounding frequency on your earnings.
Project how much interest you can earn on a specific deposit amount over time.
Make informed decisions about where to place your savings for short-to-medium term goals.
Disclaimer: This calculator provides an estimate of CD earnings based on the inputs provided. It does not account for taxes, fees, early withdrawal penalties, or potential changes in interest rates if the CD is not held to maturity. Always consult with a financial institution for precise terms and conditions.
function calculateCD() {
var principalAmount = parseFloat(document.getElementById("principalAmount").value);
var annualInterestRate = parseFloat(document.getElementById("annualInterestRate").value);
var termMonths = parseInt(document.getElementById("termMonths").value);
var compoundingFrequency = parseInt(document.getElementById("compoundingFrequency").value);
// Input validation
if (isNaN(principalAmount) || principalAmount <= 0) {
alert("Please enter a valid Deposit Amount.");
return;
}
if (isNaN(annualInterestRate) || annualInterestRate < 0) {
alert("Please enter a valid Annual Interest Rate.");
return;
}
if (isNaN(termMonths) || termMonths <= 0) {
alert("Please enter a valid CD Term in Months.");
return;
}
if (isNaN(compoundingFrequency) || compoundingFrequency <= 0) {
alert("Please enter a valid Compounding Frequency (e.g., 12 for monthly).");
return;
}
var rateDecimal = annualInterestRate / 100;
var termYears = termMonths / 12;
// Compound Interest Formula: A = P (1 + r/n)^(nt)
// A = Future Value
// P = Principal
// r = Annual interest rate (decimal)
// n = Number of times interest is compounded per year
// t = Time in years
var futureValue = principalAmount * Math.pow(1 + rateDecimal / compoundingFrequency, compoundingFrequency * termYears);
var earnings = futureValue – principalAmount;
// Display results
document.getElementById("earningsResult").innerText = earnings.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
document.getElementById("totalValueResult").innerText = futureValue.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
document.getElementById("resultLabel").innerText = "Estimated Earnings";
document.getElementById("totalValueLabel").innerText = "Total Value at Maturity";
}