Forward Rate Calculator (from Spot Rates)
Use this calculator to determine the implied forward interest rate between two future points in time, based on currently available spot rates for different maturities.
.forward-rate-calculator-container {
border: 1px solid #ddd;
padding: 25px;
background-color: #f9f9f9;
border-radius: 8px;
max-width: 500px;
margin: 20px auto;
}
.forward-rate-calculator-container h2 {
text-align: center;
margin-bottom: 15px;
}
.input-group {
margin-bottom: 15px;
}
.input-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.input-group input {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box; /* Important for padding */
}
.input-group small {
color: #666;
font-size: 0.8em;
}
.calc-form button {
width: 100%;
padding: 12px;
background-color: #0056b3;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
margin-top: 10px;
}
.calc-form button:hover {
background-color: #004494;
}
.calc-result {
margin-top: 20px;
padding: 15px;
background-color: #e9ecef;
border-radius: 4px;
text-align: center;
font-size: 1.1em;
min-height: 20px;
}
function calculateForwardRate() {
// Get input values
var r1_input = document.getElementById("spotRate1").value;
var t1_input = document.getElementById("time1").value;
var r2_input = document.getElementById("spotRate2").value;
var t2_input = document.getElementById("time2").value;
// Parse values to numbers
var r1_percent = parseFloat(r1_input);
var t1 = parseFloat(t1_input);
var r2_percent = parseFloat(r2_input);
var t2 = parseFloat(t2_input);
var resultDiv = document.getElementById("forwardRateResult");
// Validation
if (isNaN(r1_percent) || isNaN(t1) || isNaN(r2_percent) || isNaN(t2)) {
resultDiv.innerHTML = "
Please enter valid numeric values for all spot rates and times.";
return;
}
if (t1 < 0 || t2 < 0) {
resultDiv.innerHTML = "
Time periods cannot be negative.";
return;
}
if (t2 <= t1) {
resultDiv.innerHTML = "
The longer maturity time ($T_2$) must be greater than the shorter maturity time ($T_1$).";
return;
}
// Convert percentage rates to decimals for calculation
var r1_decimal = r1_percent / 100;
var r2_decimal = r2_percent / 100;
// Discrete Compounding Formula: F = [ (1+R2)^T2 / (1+R1)^T1 ] ^ (1/(T2-T1)) – 1
// Calculate the numerator: (1 + R2)^T2
var numerator = Math.pow((1 + r2_decimal), t2);
// Calculate the denominator: (1 + R1)^T1
var denominator = Math.pow((1 + r1_decimal), t1);
// Calculate the ratio
var ratio = numerator / denominator;
// Time difference
var timeDiff = t2 – t1;
// Calculate the forward rate in decimal form
var forwardRateDecimal = Math.pow(ratio, (1 / timeDiff)) – 1;
// Convert back to percentage
var forwardRatePercent = forwardRateDecimal * 100;
// Display the result
resultDiv.innerHTML = "The implied forward rate between year " + t1 + " and year " + t2 + " is:
" + forwardRatePercent.toFixed(4) + "%";
}
Understanding Implied Forward Rates
In fixed income markets, a "spot rate" is the interest rate for a bond or loan that starts immediately (on the "spot" date). A "forward rate" is an interest rate applicable to a financial transaction that will take place in the future.
This calculator uses the concept of "no-arbitrage" theory. It assumes that an investor should be indifferent between two strategies:
- Investing at the long-term spot rate ($R_2$) for the full duration ($T_2$).
- Investing at the short-term spot rate ($R_1$) for duration ($T_1$), and then reinvesting the proceeds at the future forward rate for the remaining time ($T_2 – T_1$).
By knowing the current spot rates for two different maturities, we can mathematically determine what the market expects the interest rate to be for the period between those two maturity dates.
The Forward Rate Formula
This calculator uses the discrete compounding formula to determine the forward rate ($F$) between time $T_1$ and time $T_2$, given spot rates $R_1$ and $R_2$:
(1 + R₂)^T₂ = (1 + R₁)^T₁ × (1 + F)^(T₂ – T₁)
Solving for $F$ gives us:
F = [ (1 + R₂)^T₂ / (1 + R₁)^T₁ ]^(1 / (T₂ – T₁)) – 1
Example Calculation
Let's assume the current yield curve provides the following spot rates:
- The 1-year spot rate ($R_1$) is 3.0% ($T_1 = 1$).
- The 2-year spot rate ($R_2$) is 4.0% ($T_2 = 2$).
An investor wants to know the implied 1-year forward rate starting one year from now (often denoted as the "1y1y" rate).
Using the calculator above, we enter R1=3.0, T1=1, R2=4.0, and T2=2.
The math works out as follows:
F = [ (1.04)^2 / (1.03)^1 ]^(1 / (2 – 1)) – 1
F = [ 1.0816 / 1.03 ]^1 – 1
F = 1.050097 – 1
F = 0.050097 or 5.0097%
This means that to justify the 2-year rate being 4% when the 1-year rate is only 3%, the market is implicitly pricing in a rate of approximately 5.01% for the second year.