A forward rate is the interest rate on a bond or loan agreement that is set today for a loan that will occur in the future. For example, a forward rate could be set for a loan that will begin in one year, but will last for a term of one year. The forward rate is determined by the market's expectation of future interest rates.
The formula for calculating the forward rate involves the spot rates for two different maturities. The spot rate is the current interest rate for a loan that begins today. If we have the spot rate for a 1-year loan (S1) and the spot rate for a 2-year loan (S2), we can calculate the forward rate for a loan that will start in one year and last for one year (F1,2).
Calculator
%
%
function calculateForwardRate() {
var spotRate1YearInput = document.getElementById("spotRate1Year").value;
var spotRate2YearInput = document.getElementById("spotRate2Year").value;
var resultDiv = document.getElementById("result");
if (spotRate1YearInput === "" || spotRate2YearInput === "") {
resultDiv.innerHTML = "Please enter both spot rates.";
return;
}
var spotRate1Year = parseFloat(spotRate1YearInput) / 100;
var spotRate2Year = parseFloat(spotRate2YearInput) / 100;
if (isNaN(spotRate1Year) || isNaN(spotRate2Year)) {
resultDiv.innerHTML = "Invalid input. Please enter valid numbers for spot rates.";
return;
}
// Formula: (1 + S2)^2 / (1 + S1) – 1 = F1,2
var numerator = Math.pow((1 + spotRate2Year), 2);
var denominator = (1 + spotRate1Year);
if (denominator === 0) {
resultDiv.innerHTML = "Invalid input: (1 + Spot Rate 1 Year) cannot be zero.";
return;
}
var forwardRate = (numerator / denominator) – 1;
if (isNaN(forwardRate)) {
resultDiv.innerHTML = "Calculation resulted in NaN. Please check your inputs.";
return;
}
resultDiv.innerHTML = "Forward Rate (1 Year starting in 1 Year): " + (forwardRate * 100).toFixed(4) + "%";
}