.sofr-calc-container {
padding: 25px;
background-color: #f8f9fa;
border-radius: 10px;
border: 1px solid #dee2e6;
max-width: 600px;
margin: 20px auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
color: #333;
}
.sofr-calc-container h2 {
margin-top: 0;
color: #004085;
font-size: 24px;
text-align: center;
}
.sofr-input-group {
margin-bottom: 15px;
}
.sofr-input-group label {
display: block;
font-weight: 600;
margin-bottom: 5px;
font-size: 14px;
}
.sofr-input-group input {
width: 100%;
padding: 10px;
border: 1px solid #ced4da;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.sofr-btn {
width: 100%;
padding: 12px;
background-color: #004085;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
font-weight: 700;
cursor: pointer;
transition: background-color 0.2s;
}
.sofr-btn:hover {
background-color: #002752;
}
.sofr-result {
margin-top: 20px;
padding: 15px;
background-color: #e7f3ff;
border-left: 5px solid #004085;
display: none;
}
.sofr-result h3 {
margin: 0 0 10px 0;
font-size: 18px;
color: #004085;
}
.sofr-result p {
margin: 5px 0;
font-size: 20px;
font-weight: bold;
}
.sofr-article {
margin-top: 40px;
line-height: 1.6;
}
.sofr-article h2 {
color: #2c3e50;
border-bottom: 2px solid #eee;
padding-bottom: 10px;
}
.sofr-article h3 {
color: #34495e;
margin-top: 25px;
}
How to Calculate the SOFR Compounded Rate
The Secured Overnight Financing Rate (SOFR) is the primary benchmark for dollar-denominated derivatives and loans, replacing the now-defunct LIBOR. Unlike LIBOR, which was based on bank estimates, SOFR is based on actual transaction data in the Treasury repo market.
The Compounded SOFR Formula
Because SOFR is an overnight rate, most financial contracts use a compounded average over a specific period (usually 30, 90, or 180 days). The most accurate way to calculate this is using the SOFR Index values published by the Federal Reserve Bank of New York.
The formula for the compounded annualized SOFR rate is:
Rate = [(SOFR IndexEnd / SOFR IndexStart) – 1] × (360 / N) × 100
Where:
- SOFR IndexEnd: The index value at the end of the interest period.
- SOFR IndexStart: The index value at the beginning of the interest period.
- N: The total number of calendar days in the period.
- 360: The standard day-count convention for SOFR (money market basis).
Practical Example
Suppose you are calculating the rate for a 30-day period with the following data:
- Start Index: 1.05000000
- End Index: 1.05450000
- Days: 30
Step 1: Divide the End Index by the Start Index (1.0545 / 1.05 = 1.0042857).
Step 2: Subtract 1 (0.0042857).
Step 3: Multiply by (360 / 30), which is 12 (0.0042857 * 12 = 0.051428).
Step 4: Convert to a percentage (5.1428%).
Why Use the Index?
The SOFR Index is designed to simplify the calculation of compounded averages. It reflects the cumulative impact of compounding the daily SOFR rate since April 2, 2018. Using the index removes the need to manually compound every daily rate manually over a 90-day or 180-day window, significantly reducing calculation errors.
function calculateSOFR() {
var startIdx = document.getElementById("startIndex").value;
var endIdx = document.getElementById("endIndex").value;
var days = document.getElementById("calendarDays").value;
var resultDiv = document.getElementById("sofrResultDisplay");
var rateDisplay = document.getElementById("annualizedRateValue");
var explanation = document.getElementById("calcExplanation");
// Input Validation
if (startIdx === "" || endIdx === "" || days === "") {
alert("Please enter all required values.");
return;
}
var start = parseFloat(startIdx);
var end = parseFloat(endIdx);
var d = parseFloat(days);
if (isNaN(start) || isNaN(end) || isNaN(d) || d <= 0 || start <= 0) {
alert("Please enter valid positive numbers.");
return;
}
// Compounded Annualized Rate Calculation
// Formula: ((End / Start) – 1) * (360 / Days) * 100
var calculatedRate = ((end / start) – 1) * (360 / d) * 100;
// Output formatting
rateDisplay.innerHTML = calculatedRate.toFixed(5) + "%";
explanation.innerHTML = "Annualized compounded rate based on a 360-day year convention.";
// Show result
resultDiv.style.display = "block";
}