Berkshire Bank Cd Rates Calculator

Berkshire Bank CD Rates Calculator

Calculate the potential earnings on your Certificate of Deposit (CD) with Berkshire Bank. This calculator helps you estimate the maturity value and total interest earned based on the deposit amount, annual percentage yield (APY), and term length.

function calculateCdEarnings() { var depositAmount = parseFloat(document.getElementById("depositAmount").value); var apyRate = parseFloat(document.getElementById("apyRate").value); var termInMonths = parseInt(document.getElementById("termInMonths").value); var resultDiv = document.getElementById("result"); resultDiv.innerHTML = ""; // Clear previous results if (isNaN(depositAmount) || isNaN(apyRate) || isNaN(termInMonths) || depositAmount <= 0 || apyRate < 0 || termInMonths <= 0) { resultDiv.innerHTML = "Please enter valid positive numbers for all fields."; return; } // Convert APY to a monthly rate for compounding var monthlyInterestRate = Math.pow(1 + (apyRate / 100), 1 / 12) – 1; // Calculate maturity value using the compound interest formula: 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 (we'll approximate for monthly compounding) // t = the number of years the money is invested or borrowed for // For monthly compounding: r = monthlyInterestRate, n = 12, t = termInMonths / 12 var maturityValue = depositAmount * Math.pow(1 + monthlyInterestRate, termInMonths); var totalInterestEarned = maturityValue – depositAmount; resultDiv.innerHTML = "Estimated Maturity Value: $" + maturityValue.toFixed(2) + "" + "Total Interest Earned: $" + totalInterestEarned.toFixed(2) + ""; } #berkshireBankCdCalculator { font-family: sans-serif; border: 1px solid #ccc; padding: 20px; border-radius: 8px; max-width: 500px; margin: 20px auto; box-shadow: 2px 2px 10px rgba(0,0,0,0.1); } #berkshireBankCdCalculator h2 { text-align: center; margin-bottom: 20px; color: #333; } .calculator-inputs { display: grid; gap: 15px; } .input-group { display: flex; flex-direction: column; } .input-group label { margin-bottom: 5px; font-weight: bold; color: #555; } .input-group input { padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 1em; } #berkshireBankCdCalculator button { padding: 12px 20px; background-color: #0056b3; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 1.1em; transition: background-color 0.3s ease; } #berkshireBankCdCalculator button:hover { background-color: #003d80; } .calculator-result { margin-top: 25px; padding: 15px; background-color: #e9ecef; border: 1px solid #dee2e6; border-radius: 4px; text-align: center; font-size: 1.1em; } .calculator-result p { margin: 5px 0; }

Leave a Comment