Calculate the Annual Percentage Yield (APY) for your Certificate of Deposit (CD) to understand your true earnings.
%
APY: —%
Total Earnings: —
Understanding and Calculating APY for Certificates of Deposit (CDs)
A Certificate of Deposit (CD) is a savings product offered by banks and credit unions that provides a fixed rate of interest over a specified term. While the interest rate is important, the Annual Percentage Yield (APY) is a more accurate measure of your potential earnings because it accounts for the effect of compounding.
What is APY?
APY represents the total amount of interest you will earn on a deposit account over one year, including simple interest and the effect of compounding. Compounding is the process where your earned interest also starts earning interest. The more frequently interest is compounded, the higher the APY will be compared to the nominal interest rate.
Why is APY Important for CDs?
True Earnings: APY shows your actual rate of return after compounding.
Comparison Tool: It allows you to easily compare different CD offers from various financial institutions, even if they compound interest at different frequencies.
Maximizing Returns: Understanding APY helps you choose CDs that offer the best potential for growth on your investment.
How to Calculate APY
The formula for calculating APY is:
APY = (1 + r/n)^n – 1
Where:
r is the nominal annual interest rate (expressed as a decimal).
n is the number of compounding periods per year.
For example, if a CD offers a nominal interest rate of 5% compounded monthly:
r = 0.05
n = 12 (since there are 12 months in a year)
APY = (1 + 0.05/12)^12 – 1
APY = (1 + 0.00416667)^12 – 1
APY = (1.00416667)^12 – 1
APY = 1.05116189 – 1
APY ≈ 0.05116 or 5.116%
How to Calculate Total Earnings with APY
Once you have the APY, you can calculate the total earnings over the term of the CD. A simpler way to calculate total earnings, which also implicitly uses APY, is to calculate the future value of the deposit:
Future Value = P (1 + r/n)^(nt)
Where:
P is the principal amount (initial deposit).
r is the nominal annual interest rate (as a decimal).
n is the number of compounding periods per year.
t is the term of the CD in years.
Total Earnings = Future Value – P
Example Calculation
Let's use the calculator's inputs for an example:
Initial Deposit (P): $10,000
Nominal Interest Rate (r): 4.5% or 0.045
Compounding Frequency (n): 4 (Quarterly)
CD Term (t): 3 years
First, calculate the APY:
APY = (1 + 0.045/4)^4 – 1
APY = (1 + 0.01125)^4 – 1
APY = (1.01125)^4 – 1
APY = 1.045765 – 1 ≈ 0.045765 or 4.577%
Next, calculate the Future Value and Total Earnings:
Future Value = 10000 * (1 + 0.045/4)^(4*3)
Future Value = 10000 * (1.01125)^12
Future Value = 10000 * 1.14274 – 1
Future Value ≈ $11,427.40
Total Earnings = $11,427.40 – $10,000 = $1,427.40
This calculator will help you quickly determine these values for your specific CD investment.
function calculateAPY() {
var principalAmount = parseFloat(document.getElementById("principalAmount").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var compoundingFrequency = parseFloat(document.getElementById("compoundingFrequency").value);
var cdTermYears = parseFloat(document.getElementById("cdTermYears").value);
var apyResultElement = document.getElementById("apyResult");
var totalEarningsResultElement = document.getElementById("totalEarningsResult");
// Clear previous results
apyResultElement.textContent = "–";
totalEarningsResultElement.textContent = "–";
// Input validation
if (isNaN(principalAmount) || principalAmount <= 0) {
alert("Please enter a valid initial deposit amount.");
return;
}
if (isNaN(interestRate) || interestRate < 0) {
alert("Please enter a valid nominal interest rate (cannot be negative).");
return;
}
if (isNaN(compoundingFrequency) || compoundingFrequency <= 0) {
alert("Please enter a valid number of compounding periods per year (must be greater than 0).");
return;
}
if (isNaN(cdTermYears) || cdTermYears <= 0) {
alert("Please enter a valid CD term in years (must be greater than 0).");
return;
}
var rateDecimal = interestRate / 100;
var n = compoundingFrequency;
var t = cdTermYears;
var P = principalAmount;
// Calculate APY
var apy = Math.pow(1 + rateDecimal / n, n) – 1;
// Calculate Future Value
var futureValue = P * Math.pow(1 + rateDecimal / n, n * t);
// Calculate Total Earnings
var totalEarnings = futureValue – P;
// Display results, formatted to two decimal places for currency and percentage
apyResultElement.textContent = (apy * 100).toFixed(3); // Display APY with 3 decimal places for precision
totalEarningsResultElement.textContent = totalEarnings.toFixed(2);
}