Calculate your overnight rollover fees or earnings.
1 Standard Lot = 100,000 units
Found in your broker's contract specs (Long or Short). Use negative for cost.
Value of 1 pip for 1 Standard Lot (Default $10 for EURUSD)
Wednesday is typically 3 nights (Triple Swap)
Total Estimated Swap
0.00
Understanding Forex Swap Rates
In foreign exchange trading, a Swap Rate (or Rollover Rate) is the interest paid or earned for holding a currency position overnight. Because forex is traded in pairs, every trade involves borrowing one currency to buy another. The swap rate is derived from the interest rate differential between the two currencies involved in the pair.
How the Swap Calculator Works
This calculator helps traders estimate the cost or profit of holding a position open past the daily cutoff time (usually 5:00 PM EST). The calculation logic uses the following formula:
Swap Value = Trade Size (Lots) × Swap Rate (Points) × Pip Value × Number of Nights
Input Explanations:
Trade Size (Standard Lots): The volume of your trade. In standard forex accounts, 1.00 lot equals 100,000 units of the base currency.
Swap Rate (Points): This is the specific rate provided by your broker for "Long" (Buy) or "Short" (Sell) positions. It can be positive (you earn money) or negative (you pay a fee).
Pip Value: The monetary value of a single pip movement for one standard lot. For EUR/USD accounts denominated in USD, this is typically $10.
Number of Nights: How many days you intend to hold the position overnight.
Positive vs. Negative Swap
Depending on the interest rates of the central banks representing the currencies in your pair, you may either pay or earn interest:
Negative Swap: If the interest rate of the currency you bought is lower than the currency you sold, you will pay a fee.
Positive Swap (Carry Trade): If the interest rate of the currency you bought is higher than the currency you sold, you may earn interest. This strategy is known as a "Carry Trade."
The "Triple Swap" Wednesday
It is crucial to remember that spot forex trades usually settle two business days after the transaction (T+2). Therefore, if you hold a position overnight on Wednesday, the trade settles on the weekend. Since banks are closed on weekends, the swap charged on Wednesday is typically three times the normal daily rate to account for Saturday and Sunday.
Example Calculation
Imagine you are trading 2.0 Standard Lots of EUR/USD.
Trade Size: 2.0 Lots
Swap Short Rate: -0.7 Points (Broker Spec)
Pip Value: 10 (USD)
Nights: 1
Calculation: 2.0 × -0.7 × 10 × 1 = -14.00 Account Currency. You would be charged 14.00 for holding this position overnight.
function calculateSwap() {
// 1. Get Input Elements
var lotsInput = document.getElementById('fx_lots');
var swapRateInput = document.getElementById('fx_swap_rate');
var pipValueInput = document.getElementById('fx_pip_value');
var nightsInput = document.getElementById('fx_nights');
var resultArea = document.getElementById('fx_result_area');
var finalSwapDisplay = document.getElementById('fx_final_swap');
// 2. Parse Values
var lots = parseFloat(lotsInput.value);
var swapRate = parseFloat(swapRateInput.value);
var pipValue = parseFloat(pipValueInput.value);
var nights = parseFloat(nightsInput.value);
// 3. Validation
if (isNaN(lots) || isNaN(swapRate) || isNaN(pipValue) || isNaN(nights)) {
alert("Please enter valid numbers in all fields.");
resultArea.style.display = "none";
return;
}
// 4. Calculation Logic
// Formula: Lots * SwapPoints * PipValuePerLot * Nights
var totalSwap = lots * swapRate * pipValue * nights;
// 5. Formatting
// Check currency format logic – assume standard 2 decimal places for currency
var formattedSwap = totalSwap.toFixed(2);
// 6. Display Logic
finalSwapDisplay.innerHTML = formattedSwap;
resultArea.style.display = "block";
// 7. Styling based on positive/negative result
if (totalSwap > 0) {
finalSwapDisplay.className = "fx-result-value fx-result-positive";
finalSwapDisplay.innerHTML = "+" + formattedSwap;
} else if (totalSwap < 0) {
finalSwapDisplay.className = "fx-result-value fx-result-negative";
// keep the negative sign from the number itself
finalSwapDisplay.innerHTML = formattedSwap;
} else {
finalSwapDisplay.className = "fx-result-value";
}
}