How to Calculate Swap Rate

.swap-calc-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; max-width: 800px; margin: 20px auto; padding: 25px; border: 1px solid #e0e0e0; border-radius: 12px; background-color: #ffffff; box-shadow: 0 4px 6px rgba(0,0,0,0.05); } .swap-calc-header { text-align: center; margin-bottom: 30px; } .swap-calc-header h2 { color: #1a237e; margin-bottom: 10px; } .swap-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .swap-calc-field { margin-bottom: 15px; } .swap-calc-field label { display: block; font-weight: 600; margin-bottom: 8px; color: #333; } .swap-calc-field input, .swap-calc-field select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 16px; box-sizing: border-box; } .swap-calc-btn { grid-column: span 2; background-color: #1a237e; color: white; padding: 15px; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background 0.3s; margin-top: 10px; } .swap-calc-btn:hover { background-color: #283593; } .swap-calc-result { margin-top: 25px; padding: 20px; background-color: #f8f9fa; border-radius: 8px; border-left: 5px solid #1a237e; display: none; } .result-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 18px; } .result-value { font-weight: bold; color: #1a237e; } .swap-article { margin-top: 40px; line-height: 1.6; color: #444; } .swap-article h3 { color: #1a237e; border-bottom: 2px solid #eee; padding-bottom: 10px; } .swap-article ul { padding-left: 20px; } @media (max-width: 600px) { .swap-calc-grid { grid-template-columns: 1fr; } .swap-calc-btn { grid-column: span 1; } }

Forex Swap Rate Calculator

Calculate the daily interest credited or debited for holding a position overnight.

Daily Swap Amount: 0.00
Total for Period: 0.00
Position Type:

How to Calculate Swap Rates in Forex

A swap rate, also known as a rollover rate, is the interest rate differential between the two currencies of a pair that a trader is holding overnight. Depending on whether you are long or short, you will either earn or pay interest.

The Mathematical Formula

The standard formula to calculate the daily swap value is:

Swap = (Notional Value × (Base Rate – Quote Rate – Broker Fee)) / (365 × 100)

  • Notional Value: This is your trade size (Lots) multiplied by the contract size (typically 100,000 units).
  • Base Rate: The interest rate of the first currency in the pair.
  • Quote Rate: The interest rate of the second currency in the pair.
  • Broker Fee: The markup the broker takes for managing the overnight position.

Example Calculation

If you are trading 1 lot (100,000 units) of a pair where the Base currency has a 5% interest rate and the Quote currency has a 1% interest rate, and your broker charges a 0.5% markup:

  • Net Interest = 5% – 1% – 0.5% = 3.5% annually.
  • Annual Value = 100,000 × 0.035 = 3,500 units.
  • Daily Swap = 3,500 / 365 = 9.58 units per day.

Important: The 3-Day Swap Rule

Most brokers charge a triple swap on Wednesdays (or Fridays for some instruments). This is to account for the weekend when the markets are closed, but interest still accrues on the underlying capital. Always check your broker's rollover schedule to avoid unexpected costs.

function calculateForexSwap() { var lots = parseFloat(document.getElementById("lotSize").value); var contractSize = parseFloat(document.getElementById("contractSize").value); var baseRate = parseFloat(document.getElementById("baseRate").value); var quoteRate = parseFloat(document.getElementById("quoteRate").value); var markup = parseFloat(document.getElementById("brokerMarkup").value); var days = parseInt(document.getElementById("calcDays").value); if (isNaN(lots) || isNaN(contractSize) || isNaN(baseRate) || isNaN(quoteRate) || isNaN(markup) || isNaN(days)) { alert("Please enter valid numeric values for all fields."); return; } // Formula: Swap = (Notional Value * (Interest Differential – Markup)) / 365 // We use / 100 because the rates are entered as percentages var notionalValue = lots * contractSize; var interestDiff = (baseRate – quoteRate) – markup; var dailySwap = (notionalValue * (interestDiff / 100)) / 365; var totalSwap = dailySwap * days; document.getElementById("dailyAmount").innerText = dailySwap.toFixed(4) + " Units"; document.getElementById("totalAmount").innerText = totalSwap.toFixed(4) + " Units"; var swapTypeElement = document.getElementById("swapType"); if (dailySwap > 0) { swapTypeElement.innerText = "Credit (Positive Swap)"; swapTypeElement.style.color = "#2e7d32"; } else if (dailySwap < 0) { swapTypeElement.innerText = "Debit (Negative Swap)"; swapTypeElement.style.color = "#c62828"; } else { swapTypeElement.innerText = "Neutral"; swapTypeElement.style.color = "#333"; } document.getElementById("swapResult").style.display = "block"; }

Leave a Comment