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 bond pricing is the first skill in fixed income

Every bond quote you see on a broker screen, in a fund factsheet or in a treasury report is the answer to one question: what is a fixed stream of future payments worth today? If you can answer that in Excel, you can check a quote, compare two bonds with different coupons, explain why a portfolio lost value when rates rose, and build every later tool in fixed income, from yield to maturity to duration and immunisation.

This free first lesson is for finance students, junior analysts, accountants who hold bonds on the balance sheet, treasurers who invest surplus cash, and private investors who want to understand what they own. You need no finance degree. You need to know how to type a formula and copy it down a column. Everything else is built step by step, with the same fictional bond you price in the lab above: a five-year Lakeside Utilities 4.5% bond with a face value of $1,000 and a market yield of 5.2%. Lakeside Utilities is fictional and all numbers are examples. This course is educational only and not investment advice.

The real-world problem is simple to state. A bond promises fixed payments, but the market rate for similar risk moves every day. When the market demands more than the coupon, nobody will pay $1,000 for the bond, so its price must fall until the buyer earns the market rate. When the market demands less, the price rises. Pricing a bond is the arithmetic of that adjustment, and once you see it laid out row by row it stops being mysterious.

The core idea: a bond is a list of dated cash flows

A plain-vanilla (fixed-rate, bullet) bond has three ingredients. The face value, also called par or principal, is the amount the issuer repays at maturity, here $1,000. The coupon rate is the fixed interest rate printed on the bond, here 4.5% per year, so the issuer pays a coupon of $1,000 × 4.5% = $45 every year. The maturity is the date of the final payment, here five years from today. In year five the holder receives the last coupon and the face value, so the final cash flow is $1,045.

The fourth ingredient does not appear on the bond at all: the market yield. It is the return investors currently require for lending to an issuer of this credit quality for this length of time. In our example it is 5.2%. The yield is what turns future dollars into today’s dollars.

The rule is the same one used for any investment: a dollar received in the future is worth less than a dollar today, because today’s dollar could be invested at the market rate. To bring a cash flow received in year t back to today, multiply it by its discount factor, 1 ÷ (1 + y)t. The price of the bond is the sum of all discounted cash flows:

Price = CF1 ÷ (1 + y)1 + CF2 ÷ (1 + y)2 + … + CFn ÷ (1 + y)n

Notice what this formula does not need: no forecast, no guesswork about earnings, no model of the company. As long as the issuer pays as promised, the cash flows are known in advance. That is why bonds are called fixed income, and why the price depends almost entirely on one number, the yield.

This lesson uses annual coupons to keep the arithmetic visible. Many bonds pay semi-annually. Then you halve the coupon and the yield and double the number of periods. Lesson 3 of the course deals with dates between coupon payments, where accrued interest and clean versus dirty price come in.

Worked example: pricing the Lakeside Utilities bond

Here is the full cash-flow table you build in the lab. Column B holds the cash flows, column C the discount factor for each year at the 5.2% yield, and column D the present value, which is simply cash flow × discount factor. The inputs sit in B3:B6: face value in B3, coupon rate in B4, years in B5 and yield in B6. The annual coupon in B7 is =B3*B4, which returns $45.

Lakeside Utilities 4.5% bond, face $1,000, 5 years, priced at a 5.2% market yield (rounded)
Year (A)Cash flow $ (B)Discount factor (C)Present value $ (D)
145.000.95057042.78
245.000.90358440.66
345.000.85892038.65
445.000.81646436.74
51,045.000.776106811.03
Total1,225.00969.86

The formulas behind it are short. Cash flows: =$B$7 in B10:B13 and =$B$7+$B$3 in B14. Discount factors: =1/(1+$B$6)^A10 in C10, copied down to C14. Present values: =B10*C10 in D10, copied down. The price in B16 is =SUM(D10:D14), which returns $969.86.

Now the cross-check. Excel’s PV function values a level annuity plus a lump sum in one step. Its arguments are PV(rate, nper, pmt, fv). For our bond that is =PV(B6,B5,-B7,-B3). The coupon and face value are entered as negative numbers because Excel follows a cash-flow sign convention: money you receive is the opposite sign of money you pay. Entering them negative gives a positive price of $969.86, exactly the same as the table. If your two numbers differ, one of the two methods has an error, and that alone makes the cross-check worth the ten seconds it takes.

Finally, interpret the result. The price, $969.86, is below the face value of $1,000. The bond trades at a discount because the market yield (5.2%) is higher than the coupon rate (4.5%). A buyer who pays $969.86 receives $45 a year plus $1,000 at maturity. The $30.14 gained between price and face value tops up the low coupon so that the total return equals the market yield of 5.2%. That single sentence explains discount and premium bonds.

02004006008001,000DollarsYear 14543Year 24541Year 34539Year 44537Year 51,045811Cash flow ($)Present value at 5.2% ($)
Each year’s cash flow (sky) and its present value at 5.2% (peach). Coupons shrink a little each year as they are discounted further, and the final repayment dominates the price: $811.03 of the $969.86.

The chart makes one fact visible that the formula hides: about 84% of this bond’s value comes from the last payment. That is why longer bonds react so strongly to rate changes. The further away the big cash flow sits, the more a change in yield moves its present value. Lesson 6 turns that observation into a number, duration.

Step by step: building the bond pricer in Excel

  1. Enter the inputs as values, never inside formulas: face value in B3 (1000), coupon rate in B4 (4.5%, type 4.5% or 0.045), years in B5 (5) and market yield in B6 (5.2%). Format B4 and B6 as percent with Ctrl+Shift+% (Cmd+Shift+% on Mac).
  2. In B7 type =B3*B4 and press Enter. This is the annual coupon, $45.
  3. In A10 type 1 and in A11 type =A10+1. Copy A11 down to A14 with Ctrl+D after selecting A11:A14. You now have years 1 to 5.
  4. In B10 type =$B$7. The dollar signs (press F4 once after clicking B7) lock the reference so it does not move when you copy. Fill down to B13. In B14 type =$B$7+$B$3: the last coupon plus the face value.
  5. In C10 type =1/(1+$B$6)^A10. The yield is locked, the year is not, so each row discounts by its own number of years. Fill down to C14.
  6. In D10 type =B10*C10 and fill down to D14. Format B10:D14 with Home › Number › Accounting or press Ctrl+Shift+! for two decimals with thousands separators.
  7. In B16 type =SUM(D10:D14), or select D15 and press Alt+= (AutoSum) and move the result. This is the bond price.
  8. In B17 type =PV(B6,B5,-B7,-B3). It must match B16. If you prefer, use Formulas › Financial › PV to open the function dialog, which labels each argument.
  9. In B18 classify the bond: compare the price with the face value. Optionally automate it with =IF(ROUND(B16,2)=B3,"par",IF(B16<B3,"discount","premium")).
  10. Test the model: change the yield in B6 to 4.5%. The price must become exactly $1,000.00. Then try 3% and 7% and watch the price move the opposite way to the yield.
Press Ctrl+` (the grave accent key, top left on most keyboards) to toggle formula view. You see every formula in the sheet at once, which is the fastest way to spot a missing $ sign or a hard-coded number.

Price and yield move in opposite directions

Step 10 above is the most important experiment in this lesson, so it is worth doing systematically. If you put yields from 3% to 7% in a column and price the same bond at each one with =PV(y,5,-45,-1000), you get the curve below. At 3% the bond is worth $1,068.70, a premium. At 4.5%, the coupon rate, it is worth exactly par. At our market yield of 5.2% it is worth $969.86, and at 7% only $897.50.

9009501,0001,050Price ($)3%4%5%6%7%Face value $1,0005.2% yield: $969.864.5% = coupon: parBond price ($)
The same bond priced at yields from 3% to 7%. Price falls as yield rises, and the curve bends (it is convex): it falls a little less steeply at higher yields.

Two features of this curve drive the rest of the course. First, the slope: how many dollars the price moves for a one-percentage-point change in yield. That is what duration measures. Second, the bend: the line is not straight, so a straight-line estimate becomes inaccurate for large rate moves. That is convexity. Both start from exactly the table you just built, which is why bond analysts always begin with cash flows and discount factors rather than jumping to a single function.

You can build the curve yourself in a minute: put the yields in one column, use =PV(F2,$B$5,-$B$7,-$B$3) next to the first one, fill down, select both columns and choose Insert › Charts › Scatter with Smooth Lines. A scatter chart is the right choice here, because the yields are numbers on an axis, not categories.

Fixed income and bond analytics course in Excel: bond cash flows, yields and duration
Fixed Income & Bond Analytics: from one bond’s cash flows to the duration of a whole portfolio, all in Excel.

Common mistakes and how to spot them

  • Forgetting the face value in the last year. If your price is only about $194, you valued the coupons alone. Check that the final cash flow is coupon plus face value, and that PV has the fourth argument.
  • Mixing up the coupon rate and the yield. The coupon rate sets the cash flows. The yield discounts them. If you discount at 4.5% you will always get par, which is a sign you used the wrong rate.
  • Wrong signs in PV. =PV(B6,B5,B7,B3) returns −969.86. The value is right but negative. Enter the coupon and face as negatives to get a positive price, or wrap the function in a minus sign. Be consistent.
  • Unlocked references. If the discount factors in C11:C14 look random, the yield reference moved when you copied it. Use $B$6.
  • Typing 5.2 instead of 5.2%. A yield of 5.2 means 520%. The price collapses to a few dollars. Always check the cell is formatted as a percentage.
  • Annual formula on a semi-annual bond. If the bond pays twice a year, use the coupon ÷ 2, the yield ÷ 2 and years × 2. Otherwise your price is slightly off and will not match a market quote.
  • Hard-coded numbers in formulas. =45/(1.052)^1 gives the right answer once, but the model no longer responds when the yield changes. Every assumption belongs in an input cell.

Quick reference: functions and shortcuts used

Excel tools for bond pricing
Function or shortcutWhat it doesExample from this lesson
PV(rate, nper, pmt, [fv])Present value of level payments plus a lump sum=PV(B6,B5,-B7,-B3) → 969.86
SUM(range)Adds the present values=SUM(D10:D14)
^ operatorRaises to a power for discounting=1/(1+$B$6)^A10
IF with ROUNDClassifies premium, discount or par without rounding noise=IF(ROUND(B16,2)=B3,"par",…)
F4Cycles absolute and relative referencesB6 → $B$6
Ctrl+DFills the formula down a selected rangeC10:C14
Alt+=AutoSumTotals D10:D14
Ctrl+`Shows all formulasAudit the cash-flow table
Ctrl+Shift+%Percent formatB4, B6

Real-world uses

  • Checking a broker quote. Before buying a corporate or government bond, rebuild the price from the coupon, maturity and quoted yield. If your number differs materially from the quote, find out why before you trade (often it is accrued interest, covered in lesson 3).
  • Treasury cash management. A company that parks surplus cash in short-term bonds can use the same table to show the finance committee what happens to the portfolio’s value if yields rise by one percentage point.
  • Accounting for bond investments and issued debt. Amortised-cost accounting starts from the present value of the cash flows at the effective rate, which is exactly this calculation. The discount of $30.14 is then unwound over the life of the bond.
  • Comparing two bonds with different coupons. A 3% bond and a 6% bond cannot be compared on coupon alone. Pricing both at the same yield, or computing each one’s yield from its price, puts them on a common footing.
  • Exam and interview preparation. Bond pricing questions appear in finance courses and analyst interviews. Being able to lay out the cash flows and explain the discount in words is often worth more than knowing a calculator shortcut.

What you will build in the rest of this course

The first lesson is free. Lessons 2 to 20 are part of the paid course, a one-time purchase of $9.90, and each one builds on the sheet you just finished.

Yield to Maturity with RATE & Current Yield. Here you run the problem backwards: given a market price, what return does the bond really pay? You use RATE to solve for the yield, compare it with the simple current yield and learn why the two differ for discount and premium bonds.

Accrued Interest: Clean vs Dirty Price (30/360). Bonds trade between coupon dates, and the seller is owed part of the next coupon. You count days on a 30/360 basis, calculate accrued interest and see why screens quote the clean price while the buyer pays the dirty price.

Spot Rates: Pricing a Bond off the Zero Curve. One yield for all years is a simplification. You discount each cash flow at its own zero-coupon rate and see how the shape of the curve changes the price.

Forward Rates from Spot Rates. You extract the rates the market implies for future periods from today’s spot curve, a core tool for comparing “lock in now” against “roll over later”.

Macaulay & Modified Duration: the Table Method. You extend the cash-flow table from this lesson with one column of time-weighted present values and get duration, the single number that says how sensitive the price is to yield.

Convexity: Better Price-Change Estimates. You add a second-order correction for the bend in the price-yield curve you plotted above and compare the estimate with a full repricing.

Portfolio Duration & Immunisation Basics. Finally you combine several bonds, compute the duration of the whole portfolio and match it to a future liability, the basic idea behind how pension funds and insurers manage interest-rate risk.

Summary

A bond price is the sum of its cash flows, each discounted at the market yield. Lay the cash flows out year by year, multiply by the discount factors, add them up and cross-check with PV. When the yield is above the coupon rate the bond trades at a discount, when it is below it trades at a premium, and when they are equal it trades at par. For the Lakeside Utilities bond the answer is $969.86, a discount bond.

Now scroll up and do it yourself in the lab: fill the coupon, the five cash flows, the discount factors and the price, then check it with PV. Once the numbers match, change the yield and watch the price move. That one experiment is the foundation of everything else in fixed income.

Frequently asked questions

How do you calculate the price of a bond in Excel?

Discount each cash flow at the market yield with =CF/(1+y)^t and add them up, or use =PV(yield, years, -coupon, -face) in one step. Both methods give the same price.

Why does PV return a negative bond price?

Excel uses a cash-flow sign convention, so money received and money paid have opposite signs. Enter the coupon and face value as negative numbers to get a positive price.

What is the difference between the coupon rate and the yield?

The coupon rate is fixed on the bond and sets the dollar coupons. The yield is the market return investors currently require and is used to discount the cash flows.

Why does a bond price fall when interest rates rise?

The cash flows are fixed, so a higher discount rate makes each future payment worth less today. The price must fall until the buyer earns the new market yield.

What is a discount bond and a premium bond?

A discount bond trades below face value because its yield is above the coupon rate. A premium bond trades above face value because its yield is below the coupon rate.

How do I price a bond with semi-annual coupons in Excel?

Halve the annual coupon and the annual yield and double the number of years, for example =PV(5.2%/2, 5*2, -45/2, -1000). Then discount each half-year cash flow at the half-year rate.

Keep going: Fixed Income & Bond Analytics

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. Yield to Maturity with RATE & Current Yield
  2. Accrued Interest: Clean vs Dirty Price (30/360)
  3. Spot Rates: Pricing a Bond off the Zero Curve
  4. Forward Rates from Spot Rates
  5. Macaulay & Modified Duration: the Table Method
  6. Convexity: Better Price-Change Estimates
  7. Portfolio Duration & Immunisation Basics
  8. The Price–Yield Curve: Coupon, Maturity & Sensitivity
  9. Pricing with Real Dates: PRICE, YIELD & Coupon-Day Functions
  10. Bootstrapping Spot Rates from Coupon Bond Prices
  11. Rich or Cheap? Comparing Bond Prices with the Zero Curve
  12. Callable Bonds: Yield to Call & Yield to Worst
  13. Floating-Rate Notes: Coupon Resets & the Discount Margin
  14. Corporate Bonds vs Treasuries: G-Spreads by Rating
  15. Effective Duration & Convexity by Bump-and-Reprice
  16. Yield-Curve Shifts: Bullet vs Barbell Portfolios
  17. Holding-Period Return: Coupons, Reinvestment & Sale Price
  18. Liability-Driven Investing: PV, Duration & the Funding Gap
  19. Final Project: Bond Portfolio Risk Report

Buy course — $9.90 See the full course