Tabellab

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — $9.90
Loading the spreadsheet…

Why every swap model starts with the cash flows

Interest rate swaps are among the most widely used derivatives in the world. Companies use them to fix the cost of floating-rate loans, banks use them to manage the interest-rate risk of their balance sheets, and investors use them to express views on rates. Yet behind all the vocabulary (par rates, discount factors, DV01, hedge effectiveness) sits one very concrete question: on each payment date, who pays whom, and how much? If you cannot lay out the cash flows of a swap line by line, every valuation built on top of them is a black box.

This free lesson is for treasury and finance staff at companies with bank loans, junior analysts in banking and asset management, accounting staff who need to understand hedges, and students of corporate finance or fixed income. You need basic Excel: entering formulas, copying them down and using absolute references. You will build the complete payment schedule of a 2-year swap: day count fractions, the fixed leg, the floating leg and the net settlement.

We follow the fictional Corvane Logistics, which has entered a 2-year pay-fixed swap with a bank on a notional of USD 50 million. Corvane pays a fixed 3.80 % and receives SOFR, with payments every six months. The rates and SOFR fixings are illustrative, the model is simplified, and nothing here is investment or hedging advice. The lab above uses exactly the numbers in this article.

Corvane pay-fixed swap: who pays whatCorvane Logisticspays fixedSwap bankpays floatingfixed 3.80 % × 30/360SOFR fixing × act/360Settled: only the net differenceNotional USD 50,000,000: used to calculate interest, never exchangedEvery 6 months, 4 periods from 15 Jan 2026 to 15 Jan 2028
The structure of Corvane's swap. Two interest streams are calculated on the same notional, but only the difference changes hands on each payment date.

The core concept: two interest streams on one notional

A plain-vanilla interest rate swap is an agreement to exchange two streams of interest payments calculated on the same notional amount. One stream, the fixed leg, uses a rate agreed at the start. The other, the floating leg, uses a reference rate that is reset over time. In US dollar markets that reference rate is now usually SOFR, the Secured Overnight Financing Rate. The notional is never exchanged. It only serves as the base for calculating interest, which is why a USD 50 million swap involves payments of around USD 1 million, not USD 50 million.

Every single payment follows the same pattern:

Payment = notional × rate × day count fraction

The day count fraction (DCF) says what share of a year the period represents. Different markets and legs use different conventions, and they matter more than beginners expect. Corvane's swap uses two of the most common ones:

  • 30/360 on the fixed leg: every month is treated as having 30 days and the year as 360 days. From 15 January to 15 July is 6 × 30 = 180 days, and 180 ÷ 360 = exactly 0.5. In Excel this is =YEARFRAC(start, end, 0), where basis 0 means US (NASD) 30/360.
  • Actual/360 on the floating leg: the real number of calendar days divided by 360. From 15 January to 15 July 2026 is 181 days, so the DCF is 181 ÷ 360 = 0.502778. From 15 July 2026 to 15 January 2027 is 184 days, so 0.511111. In Excel: =(end-start)/360 or =YEARFRAC(start, end, 2).

Notice that actual/360 always gives a fraction slightly above 0.5 for a half-year period, because a real half year has 181 to 184 days. Over a year the floating leg therefore accrues on roughly 365 ÷ 360 of the rate. This is a detail that regularly surprises people when they compare a swap rate with a loan rate quoted on a different basis.

Netting: because both legs are paid on the same dates in the same currency, swaps normally settle only the difference. For Corvane, which pays fixed and receives floating, the net is floating leg − fixed leg. Positive means Corvane receives money, negative means Corvane pays.

Worked example: Corvane's four payment periods

Here is the full schedule from the lab. Inputs are the notional in D2 (50,000,000), the fixed rate in D3 (3.80 %) and the SOFR fixings in F7:F10. The dates and the 30/360 fractions in column D are already filled in.

PeriodStartEndDaysFixed DCFFloat DCFSOFRFixed legFloating legNet to Corvane
115 Jan 202615 Jul 20261810.50000.50283.65 %950,000.00917,569.44−32,430.56
215 Jul 202615 Jan 20271840.50000.51113.90 %950,000.00996,666.67+46,666.67
315 Jan 202715 Jul 20271810.50000.50284.05 %950,000.001,018,125.00+68,125.00
415 Jul 202715 Jan 20281840.50000.51113.70 %950,000.00945,555.56−4,444.44
Total7302.00002.02783,800,000.003,877,916.67+77,916.67

The formulas behind it, written in row 7 and copied down to row 10:

CellWhat it calculatesFormula
E7Floating DCF, actual/360=(C7-B7)/360 (or =YEARFRAC(B7,C7,2))
G7Fixed leg payment=$D$2*$D$3*D7
H7Floating leg payment=$D$2*F7*E7
I7Net settlement to Corvane=H7-G7
G11, H11, I11Totals=SUM(G7:G10), =SUM(H7:H10), =SUM(I7:I10)
I11 (one-cell check)Total net without helper columns=D2*(SUMPRODUCT(F7:F10,C7:C10-B7:B10)/360-D3*SUM(D7:D10))

Look at period 1. SOFR fixed at 3.65 %, below Corvane's fixed rate of 3.80 %, so Corvane pays the bank USD 32,430.56. In periods 2 and 3, SOFR was above the fixed rate and Corvane received money. In period 4 SOFR was 3.70 %, slightly below 3.80 %, but Corvane still paid only USD 4,444.44, because the floating leg accrues on 184 actual days while the fixed leg counts exactly 180. The day count convention narrowed the gap.

Over the two years Corvane received a net USD 77,916.67. That does not mean the swap was a "win" in any deeper sense. If Corvane has a SOFR-based loan, the swap payments offset changes in the loan interest, and the point of the hedge is to make total costs predictable, not to make money. You will measure exactly that offset in lesson 7.

Fixed leg vs floating leg per period (USD)850k900k950k1,000k1,050k950k918kPeriod 1950k997kPeriod 2950k1,018kPeriod 3950k946kPeriod 4axis starts at 850k to show the differencesfixed (Corvane pays)floating (Corvane receives)
The fixed leg is the same USD 950,000 every period because 30/360 makes each half year exactly 0.5. The floating leg moves with SOFR and with the number of actual days in the period.

Net settlement to Corvane per period (USD)-40k-20k0k20k40k60k80k-32,431Period 1Jan-Jul 2026+46,667Period 2Jul 2026-Jan 2027+68,125Period 3Jan-Jul 2027-4,444Period 4Jul 2027-Jan 2028
Net settlement from Corvane's point of view. Mint bars are payments Corvane receives, peach bars are payments it makes. The total over two years is +USD 77,916.67.

Step by step: how to do it in Excel

Work through the lab above, or rebuild the schedule in your own Excel, Google Sheets or LibreOffice file.

  1. Check the dates in B7:C10. They are created with =DATE(2026,1,15) and so on, and each start date refers to the previous end date (=C7), so the periods connect without gaps. Format them with Home › Number Format › Short Date if you build your own.
  2. Look at D7: =YEARFRAC(B7,C7,0) returns 0.5. Basis 0 is US 30/360.
  3. Click E7 and type =(C7-B7)/360. Excel stores dates as serial numbers, so subtracting them gives the number of days. Press Enter, then select E7:E10 and press Ctrl+D to fill down.
  4. Click G7 and type =$D$2*$D$3*D7. Press F4 while the cursor is on D2 and on D3 to lock them. Fill down to G10.
  5. Click H7 and type =$D$2*F7*E7. Here only the notional is locked: the SOFR fixing and the DCF must move with the row. Fill down to H10.
  6. Click I7, type =H7-G7 and fill down. Then add totals in row 11 with =SUM(G7:G10) etc., or select G11:I11 and press Alt+= (AutoSum).
  7. Apply a number format with two decimals and thousands separators: Ctrl+Shift+!, or Home › Number › Comma Style.
  8. Check the answers with the Coach. It tests E10, G10, H10 and the total net in I11.

Why day counts and conventions matter so much

A difference of a few days per period sounds trivial. On a USD 50 million notional it is not. If the fixed leg were calculated on actual/360 instead of 30/360, its four payments would be 955,277.78, 971,111.11, 955,277.78 and 971,111.11, a total of USD 3,852,777.78 instead of USD 3,800,000. That is a difference of USD 52,777.78 caused only by the choice of convention, roughly two thirds of the total net settlement in this example.

This is why swap confirmations specify every convention explicitly: the day count of each leg, the payment frequency, the business-day adjustment rule, the calendar used for holidays, the reset dates and the exact definition of the floating rate. Real SOFR swaps usually compound the daily overnight rate over the period and pay a few days after the period ends, rather than using a single fixing as in this lab. The lab keeps one fixing per period on purpose, so you can see the mechanics without a daily rate table. The principle, notional times rate times day count fraction, stays exactly the same.

In any swap model, keep the conventions as visible labels next to the numbers (the lab does this in row 6 headers and the note in A4). When a number disagrees with a bank statement, the convention is the first thing to check.

A useful extra: the breakeven SOFR level

Once the schedule is built, you can ask a question that treasurers like: what constant SOFR level would have made the swap exactly neutral over the two years? The fixed leg totals USD 3,800,000. The floating leg at a constant rate r would be 50,000,000 × r × 730 ÷ 360. Setting the two equal gives r = 3,800,000 ÷ (50,000,000 × 2.027778) ≈ 3.748 %.

In Excel you can write this in a spare cell as =D3*SUM(D7:D10)/((C10-B7)/360). The result is a little below the fixed rate of 3.80 %, again because of the day counts: the floating leg accrues on 730 actual days, the fixed leg on 720 "30/360 days". So a SOFR level that matched the fixed rate exactly would still leave Corvane slightly ahead. This kind of comparison is a first step towards the par swap rate of lesson 4, where the breakeven fixed rate is found from today's discount curve instead of from fixings that have already happened.

You can also turn the question around and ask the bank's view. For the bank the cash flows are the mirror image: it receives fixed and pays floating, so every positive number in column I is a payment the bank makes. In a real swap book, a dealer would normally offset this position with other clients or in the interbank market, which is why the swap rate a company is quoted reflects the market curve plus a margin for credit risk and costs.

Interest rate swaps course illustration showing fixed and floating payment streams between two parties
The Interest Rate Swaps course builds from these cash flows to curve bootstrapping, par swap rates, mark-to-market, DV01 and hedging.

Common mistakes and how to spot them

These errors appear constantly in swap spreadsheets, including professional ones:

  • Dividing by 365 on an actual/360 leg. Symptom: the floating DCFs are just under 0.5 (0.4959, 0.5041) instead of just over. Actual/360 always divides by 360.
  • Using the wrong DCF for a leg. The fixed leg uses column D (30/360), the floating leg column E (actual/360). If the fixed leg payments are not identical every period, you probably used column E.
  • Forgetting the DCF entirely. =$D$2*$D$3 gives USD 1,900,000, a full year of interest. A half-year payment should be roughly half of that.
  • Missing or extra dollar signs. Without $D$2, copying down shifts the notional reference to D3, D4 and so on. With $F$7, every period uses the first SOFR fixing. Press F2 on a lower row to see which cells a formula really uses.
  • Wrong sign on the net. For a pay-fixed party the net is floating minus fixed. If your total is −77,916.67, you calculated it from the bank's side.
  • Using the fixed rate on the floating leg. Symptom: the floating leg barely varies across periods. Each period must use its own SOFR fixing from column F.
  • Dates stored as text. If =C7-B7 returns #VALUE!, the dates are text. Re-enter them with DATE() or use Data › Text to Columns to convert them.

Quick reference: functions and shortcuts in this lesson

Everything used in the lab, in one place:

Function or shortcutWhat it doesExample
DATE(y,m,d)Creates a date serial number=DATE(2026,1,15)
YEARFRAC(start,end,0)Year fraction, US 30/360=YEARFRAC(B7,C7,0) → 0.5
YEARFRAC(start,end,2)Year fraction, actual/360=YEARFRAC(B7,C7,2) → 0.502778
(end-start)/360Actual/360 by hand=(C7-B7)/360
SUM(range)Adds a column of payments=SUM(G7:G10) → 3,800,000
SUMPRODUCT(a,b)Multiplies pairs and adds them=SUMPRODUCT(F7:F10,C7:C10-B7:B10)
F4Toggles absolute referencesD2 → $D$2
Ctrl+DFills the formula downE7 to E10
Alt+=AutoSumrow 11 totals
Ctrl+Shift+!Number format with separatorsG7:I11

Real-world uses

The schedule you just built is the backbone of many everyday tasks:

  • Checking bank settlement notices. Before each payment date, the bank sends a notice with the period, the rates and the net amount. A treasury team with a schedule like this can verify the figure independently instead of simply paying it.
  • Hedging a floating-rate loan. A company with a SOFR-based term loan can put the loan interest and the swap net in adjacent columns and see the all-in cost per period. That is exactly what you will do in lesson 7.
  • Cash-flow forecasting. Replace the historical SOFR fixings with forecast forward rates (lesson 3) and the same sheet becomes a forecast of future swap payments for the budget.
  • Accounting and audit. Accrued interest on a swap at a reporting date is calculated with the same notional × rate × DCF formula, using the days from the last payment date to the reporting date.
  • Comparing quotes. When two banks quote a swap rate on different day count bases, converting both to the same basis with the DCF logic shows which quote is really cheaper.

What you will build in the rest of this course

This first lesson is free. The remaining 19 lessons are part of the paid course (USD 9.90, one-time) and continue with Corvane Logistics, so you go from cash flows to pricing, valuation, risk and hedging decisions.

Bootstrapping Discount Factors from Par Swap Rates. You strip 1- to 5-year par swap rates into discount factors one maturity at a time, add them up into the annuity and convert them into zero rates.

Forward Rates and Forward Swap Rates from Discount Factors. You read 1-year forward rates out of the discount factors, price a 2-year rate that starts in 3 years and a forward-starting swap, and chart the three curves.

The Par Swap Rate with SUMPRODUCT. You price a 3-year semi-annual swap: the annuity with SUMPRODUCT, the floating leg, the fair fixed rate and the value of a dealer's off-market quote.

Marking a Swap to Market after Rates Move. One year after Corvane locked in a fixed rate, rates are higher. You revalue both legs on today's curve and find out what the swap is now worth.

DV01 and PV01: Bumping the Curve by 1 bp. You shift every zero rate up by one basis point, reprice the swap and measure how many dollars it gains or loses per basis point, the number every risk manager asks for.

Hedging a Floating-Rate Loan: Net Cost & Hedge Effectiveness. You run a USD 40 million SOFR loan and a USD 30 million pay-fixed swap through eight quarters, find the net interest cost and test how well the swap offset the rate risk.

Swap vs Interest Rate Cap: Cost Scenarios & Breakeven. You compare a year of interest unhedged, with a swap and with a cap across six SOFR scenarios, find the breakeven and chart the three cost lines.

Summary

A plain-vanilla interest rate swap exchanges fixed interest for floating interest on a notional that is never paid. Each payment is notional × rate × day count fraction. Corvane's fixed leg uses 30/360, so each half year is exactly 0.5 and every fixed payment is USD 950,000. The floating leg uses actual/360, so the fractions are 0.502778 or 0.511111 depending on the number of days. Only the net is settled: floating minus fixed from Corvane's side, which adds up to +USD 77,916.67 over the four periods in this example.

Now scroll up and build the schedule yourself in the lab. It takes about 15 minutes. Try changing one SOFR fixing in column F and watch the floating leg and the net update. Once the cash flows feel natural, the pricing and risk lessons that follow will make much more sense.

Frequently asked questions

How does a plain-vanilla interest rate swap work?

Two parties exchange interest payments on the same notional amount: one pays a fixed rate, the other pays a floating rate such as SOFR. The notional itself is not exchanged, and usually only the net difference is paid on each date.

How do you calculate a swap payment?

Multiply the notional by the rate and by the day count fraction of the period. For example, USD 50 million at 3.80 % for a 30/360 half year is 50,000,000 x 0.038 x 0.5 = USD 950,000.

What is the difference between 30/360 and actual/360?

30/360 treats every month as 30 days, so a six-month period is exactly 0.5 of a year. Actual/360 uses the real number of days divided by 360, so a 181-day period counts as 0.502778.

How do I calculate an actual/360 day count in Excel?

Subtract the start date from the end date and divide by 360, for example =(C7-B7)/360. YEARFRAC(start,end,2) gives the same result.

What does pay fixed, receive floating mean?

The party pays a fixed rate and receives the floating rate. It gains when the floating rate rises above the fixed rate, which is why companies with floating-rate loans often use pay-fixed swaps to lock in their interest cost.

Is the notional exchanged in an interest rate swap?

No. In a single-currency interest rate swap the notional is only used to calculate interest. Cross-currency swaps are different and usually do exchange principal.

Keep going: Interest Rate Swaps: Pricing, Valuation, DV01 & Hedging

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time $9.90.

  1. Bootstrapping Discount Factors from Par Swap Rates
  2. Forward Rates and Forward Swap Rates from Discount Factors
  3. The Par Swap Rate with SUMPRODUCT
  4. Marking a Swap to Market after Rates Move
  5. DV01 and PV01: Bumping the Curve by 1 bp
  6. Hedging a Floating-Rate Loan: Net Cost & Hedge Effectiveness
  7. Swap vs Interest Rate Cap: Cost Scenarios & Breakeven
  8. Off-Grid Dates: Interpolating Zero Rates and Discount Factors
  9. Projecting the Floating Leg Quarter by Quarter
  10. Off-Market Swaps: Upfront Payments and Running Spreads
  11. Valuing a Swap between Payment Dates: Dirty Value, Accrued Interest and Clean Value
  12. Key-Rate DV01: Bumping One Maturity at a Time
  13. Big Rate Shocks: Full Revaluation vs the DV01 Estimate
  14. Amortising Swaps: A Notional That Pays Down with the Loan
  15. Swapping a Fixed-Rate Bond Issue to Floating
  16. A Swap Book: Mark-to-Market, Maturity Buckets and Net DV01
  17. Choosing the Hedge Ratio: A Scenario Grid of Interest Costs
  18. Collateral under a CSA: Thresholds, Minimum Transfers and Margin Calls
  19. Final Project: Corvane's Debt & Swap Hedge Dashboard

Buy course — $9.90 See the full course