A Repurchase Agreement (Repo) is a critical instrument in the money markets, acting as a short-term collateralized loan. Financial institutions sell securities to investors with an agreement to repurchase them at a higher price on a future date. The difference between the sale price and the repurchase price constitutes the interest, calculated based on the Repo Rate.
Using the calculator above allows traders, treasurers, and students to quickly determine the financing cost (Repo Interest) and the final settlement amount (Repurchase Price) for a given transaction.
The Repo Calculation Formula
While central banks (like the Federal Reserve or the RBI) set the benchmark repo rate, calculating the specific interest due on a transaction requires the following mathematical formula:
Repo Interest = Sale Price × Repo Rate × (Days / Day Basis)
To find the final amount the borrower must pay back:
Repurchase Price = Sale Price + Repo Interest
Variables Explained
Sale Price (Principal): The initial cash amount transferred for the securities (also known as the start leg).
Repo Rate: The annualized interest rate agreed upon for the transaction.
Days: The duration of the agreement (from settlement date to maturity date). Overnight repos are 1 day.
Day Basis: The convention used for the number of days in a year.
ACT/360: Common in US money markets and Eurocurrency markets.
ACT/365: Common in UK markets and for government bonds in certain jurisdictions.
Example Calculation
Let's say a bank enters into a 7-day Repurchase Agreement for treasury bonds valued at 10,000,000. The agreed Repo Rate is 4.50%, and the market convention is ACT/360.
Identify Values: P = 10,000,000, r = 0.045, t = 7, Basis = 360.
Calculate Repurchase Price: Total = 10,000,000 + 8,750
Total = 10,008,750.00
Why is the Repo Rate Important?
The Repo Rate is a key tool for central banks to control liquidity and inflation. When the Repo Rate is high, borrowing becomes expensive for commercial banks, which reduces the money supply in the economy and helps curb inflation. Conversely, a lower Repo Rate injects liquidity into the market by making borrowing cheaper.
Reverse Repo Rate
While this calculator focuses on the Repo Rate (the cost of borrowing), the mechanism is mathematically identical for the Reverse Repo Rate, which is the rate earned when the central bank borrows money from commercial banks (or when a lender buys securities to resell them later).
function calculateRepoCost() {
// 1. Get Input Elements by ID
var salePriceInput = document.getElementById("salePrice");
var repoRateInput = document.getElementById("repoRate");
var termDaysInput = document.getElementById("termDays");
var dayCountBasisInput = document.getElementById("dayCountBasis");
var resultBox = document.getElementById("repoResult");
// 2. Parse Values
var principal = parseFloat(salePriceInput.value);
var ratePercent = parseFloat(repoRateInput.value);
var days = parseFloat(termDaysInput.value);
var basis = parseFloat(dayCountBasisInput.value);
// 3. Validation
if (isNaN(principal) || isNaN(ratePercent) || isNaN(days) || isNaN(basis)) {
alert("Please enter valid numeric values for all fields.");
return;
}
if (principal <= 0 || days <= 0) {
alert("Principal and Term must be positive numbers.");
return;
}
// 4. Calculation Logic
// Formula: Interest = Principal * (Rate / 100) * (Days / Basis)
var annualRateDecimal = ratePercent / 100;
var timeFactor = days / basis;
var interestAmount = principal * annualRateDecimal * timeFactor;
var repurchasePrice = principal + interestAmount;
// 5. Formatting Output
// Helper function for currency-like formatting without forcing a specific symbol logic hardcoded (generic decimals)
var formatter = new Intl.NumberFormat('en-US', {
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
document.getElementById("displayStartVal").innerText = formatter.format(principal);
document.getElementById("displayInterest").innerText = formatter.format(interestAmount);
document.getElementById("displayTotal").innerText = formatter.format(repurchasePrice);
// 6. Show Results
resultBox.style.display = "block";
}