Bonds
How To Calculate The Macaulay Duration
Macaulay duration answers a single question about a bond: on a present-value-weighted basis, how far into the future do you actually receive your cash? It turns a stream of coupon and principal payments into one number measured in years, and it underpins the sensitivity measure called modified duration. The calculation below uses a deliberately small two-period teaching model, not investment advice, so every step of the arithmetic stays visible.
Last updated
Quick Answer
D = (sum of t x PV(CF_t)) / Price
- D
- Macaulay duration, in years
- t
- Time until a cash flow arrives, in years
- PV(CF_t)
- Present value of the cash flow paid at time t
- Price
- Bond price, the sum of all present values
- y
- Yield per period as a decimal
Discount each cash flow by (1 + y)^t, multiply its present value by the time t, add the weighted values and divide by the bond price. For a two-year annual bond paying a coupon of 5 with a face value of 100 at a 3% yield, the duration is about 1.9532 years on a price of about 103.83. Dividing by (1 + y) gives a modified duration of about 1.8964.
What Is The Macaulay Duration?
Macaulay duration is the present-value-weighted average time until a bond's cash flows are paid. Each payment is weighted by its present value divided by the bond price, so a large payment far in the future can dominate a smaller one arriving sooner. The result is measured in years, not in percent, and it is often described as the average maturity of the cash flows. For a single-payment bond the answer is simply the date of that payment; with several payments it always lies between the earliest and the latest. Thinking of it as a centre of gravity for money makes the name much less intimidating.
The measure was introduced by Frederick Macaulay in 1938, in a study of interest rates and bond yields in the United States. He wanted one number that summarised how long an investor effectively had to wait for a bond to pay for itself. His definition survives almost unchanged in textbooks and risk systems today. What has changed is the use: duration is now mainly a sensitivity tool rather than a literal description of a holding period.
The weights come from discounting each cash flow at the yield. In the two-period teaching model used here, the year-one coupon of 5 has a present value of 5 / 1.03 = 4.8544 at a 3% yield, while the year-two payment of 105 has a present value of 105 / 1.03^2 = 98.9726. The bond price is their sum, about 103.8269. Those two present values carry roughly 4.7% and 95.3% of the weight, so the answer is pulled close to year two. The calculation is (1 x 4.8544 + 2 x 98.9726) / 103.8269 = 1.9532 years.
Duration and price sensitivity are related but not identical. Macaulay duration answers when the money arrives on a weighted basis; modified duration answers how much the price moves for a small yield change. For annual compounding, modified duration is Macaulay duration divided by (1 + y), which turns 1.9532 into about 1.8964 here. With semiannual compounding the divisor becomes (1 + y/2) instead. Confusing the two is easy, and it matters whenever the result is used to estimate an actual price change.
The direction of the effect is worth stating explicitly. When the yield rises, a bond's price falls and its Macaulay duration also becomes slightly shorter. In this model a 1% yield gives a price of about 107.8816 and a duration of 1.9541 years, while 5% gives a price of 100.0000 and a duration of 1.9524 years. At 3% the two figures sit between them at 103.8269 and 1.9532. The reason is that a higher discount rate reduces the distant cash flow's present value proportionally more, shifting weight towards the earlier coupon.
A zero-coupon bond is the cleanest boundary case. Because it has only one payment, its Macaulay duration is exactly its maturity, two years in this model. The calculator also reports 2 / (1 + y), about 1.9417 at a 3% yield, which is the modified duration of that two-year zero rather than its Macaulay duration. Comparing modified with modified, the coupon bond's 1.8964 is smaller than the zero's 1.9417 because part of the coupon bond is paid back early. That gap is the whole effect of the coupon on interest-rate sensitivity.
This page deliberately uses a two-period teaching model, and it is not investment advice. It fixes annual coupons, a single flat yield, a five-unit coupon and a face value of 100, with no accrued interest or settlement adjustments. Real bonds usually pay semiannually, trade between coupon dates and carry day-count conventions, call features and credit spreads. None of that is modelled here. The point is to make the weighting arithmetic visible, not to price a live trade or recommend a security.
Despite its simplicity, duration is used throughout fixed income. Managers compare two bonds by duration to see which one moves more when rates shift. Pension funds try to match the duration of assets to the duration of liabilities so that a rate change does not damage the funding ratio. Duration is also the first term in the duration-plus-convexity approximation of a price change. Because it compresses an entire cash-flow pattern into one number, it is a convenient shorthand for the shape of a bond.
Every approximation has a boundary, and this one is no exception. Duration treats the yield curve as flat and assumes a small, parallel shift in rates. For large moves the curvature of the price-yield relationship matters, which is why convexity is added as a second-order correction. The measure also says nothing about credit risk, liquidity or embedded options; a callable bond needs effective duration instead. Finally, duration is a sensitivity statistic, not a promise about when your capital returns: a two-year numerical answer is not a two-year guarantee.
Formula
D = (sum over t of t x PV(CF_t)) / P
Formula page →Discount each cash flow, multiply by when it arrives, sum the weighted values and divide by the bond price. The weights are the present values, so they automatically add up to the price.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| D | Macaulay duration | years | The weighted average time to cash flows, expressed in years. |
| PV(CF_t) | Present value of the cash flow at time t | currency | The payment at t discounted back to today at the yield. |
| P | Bond price | currency | The sum of every discounted cash flow; it acts as the normalising weight. |
PV(CF_t) = CF_t / (1 + y)^t
Formula page →Divide the payment by one plus the yield raised to the number of periods until it arrives. Later payments are divided by a larger factor and therefore receive less weight.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| CF_t | Cash flow at time t | currency | In the final year this is the coupon plus the face value, not the coupon alone. |
| y | Yield per period | decimal | As a decimal: a quoted 3% is entered as 0.03 in the formula. |
| t | Periods until payment | years | Counted from today; year one is t = 1, year two is t = 2. |
D_mod = D / (1 + y)
Formula page →Convert the weighted time into a price sensitivity by dividing by one plus the yield. The approximation says price change is about minus D_mod times the yield change times price.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| D_mod | Modified duration | years | The first-order estimate of percentage price response to a small yield move. |
| D | Macaulay duration | years | The present-value-weighted time computed in the first formula. |
| y | Yield per period | decimal | Use the periodic yield: with semiannual coupons this is the half-year yield. |
How To Calculate The Macaulay Duration
- 1
Express the yield as a decimal
The calculator takes the yield as a percentage and divides it by 100 internally, so entering 3 becomes 0.03 in the arithmetic. Adding 1 gives the discount base 1.03. Writing 3 directly into a discount factor would inflate the denominator about a hundredfold and destroy the result.
- 2
Discount each cash flow
With a coupon of 5 and a face value of 100, the year-one cash flow is 5 and the year-two cash flow is 105. Divide the first by 1.03 to get 4.8544 and the second by 1.03^2 to get 98.9726. Remember that the principal comes back in the final year alongside the last coupon.
- 3
Add the present values to find the price
The two discounted amounts sum to 103.8269, which is the model's bond price. This price is also the total weight: dividing each present value by it gives weights of about 4.7% and 95.3%. Those weights must add to one, which is a quick check that the discounting was done consistently.
- 4
Weight each present value by its time
Multiply the year-one present value by 1 and the year-two present value by 2, then add them. Here that is 1 x 4.8544 + 2 x 98.9726 = 202.7995. Because the final payment includes the face value, almost all of this weighted sum comes from year two.
- 5
Divide by price and interpret
The weighted sum divided by the price gives 1.9532 years. Dividing once more by 1.03 gives modified duration of about 1.8964, the number used to estimate price changes. Read the main result as a weighted average timing, not as a guaranteed holding period, and remember that this two-period model is for teaching rather than investment advice.
Examples
Example 1: Default case — coupon 5, face 100, yield 3%
- yieldRate
- 3%
- coupon
- 5
- faceValue
- 100
| Step | Calculation | Result |
|---|---|---|
| Yield as a decimal | 3 / 100 | 0.03 |
| Year-one present value | 5 / 1.03 | 4.8544 |
| Year-two present value | 105 / 1.03^2 | 98.9726 |
| Bond price | 4.8544 + 98.9726 | 103.8269 |
| Macaulay duration | (1 x 4.8544 + 2 x 98.9726) / 103.8269 | 1.9532 years |
Result: Macaulay duration is about 1.9532 years at a price of about 103.8269; modified duration is about 1.8964.
Example 2: Higher yield — coupon 5, face 100, yield 5%
- yieldRate
- 5%
- coupon
- 5
- faceValue
- 100
| Step | Calculation | Result |
|---|---|---|
| Yield as a decimal | 5 / 100 | 0.05 |
| Year-one present value | 5 / 1.05 | 4.7619 |
| Year-two present value | 105 / 1.05^2 | 95.2381 |
| Bond price | 4.7619 + 95.2381 | 100.0000 |
| Macaulay duration | (1 x 4.7619 + 2 x 95.2381) / 100.0000 | 1.9524 years |
Result: At a 5% yield the bond prices at 100.0000 and Macaulay duration shortens slightly to about 1.9524 years.
Example 3: Lower yield — coupon 5, face 100, yield 1%
- yieldRate
- 1%
- coupon
- 5
- faceValue
- 100
| Step | Calculation | Result |
|---|---|---|
| Yield as a decimal | 1 / 100 | 0.01 |
| Year-one present value | 5 / 1.01 | 4.9505 |
| Year-two present value | 105 / 1.01^2 | 102.9311 |
| Bond price | 4.9505 + 102.9311 | 107.8816 |
| Macaulay duration | (1 x 4.9505 + 2 x 102.9311) / 107.8816 | 1.9541 years |
Result: At a 1% yield the bond prices at about 107.8816 and Macaulay duration lengthens to about 1.9541 years.
Calculator
Macaulay duration (years)
1.9532
- Modified duration (years)
- 1.8964
- Bond price
- 103.8269
- Two-year zero-coupon modified duration
- 1.9417
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
Prefer a full-width tool? Open the The Macaulay Duration calculator page.
Common Mistakes
Entering the yield as 3 instead of 0.03
A quoted yield of 3% must enter the discount factors as 0.03. The field here is a percentage that the engine converts for you, but if you reproduce the formula by hand, remember to divide by 100 first. Using 3 as the yield makes 1 + y equal 4 and produces a meaningless duration.
Discounting only the coupon in the final year
The last payment is the coupon plus the face value, so it is 105 rather than 5 in this model. Dropping the principal removes most of the year-two weight and drags the duration down towards year one. Always write out the full cash flow before discounting anything.
Confusing Macaulay and modified duration
Macaulay duration is a weighted time and modified duration is that time divided by one plus the yield. The two differ by about 0.057 of a year in the default case. Use Macaulay when asked for average timing and modified when estimating a percentage price response to a rate move.
Assuming a higher yield lengthens duration
The direction is the opposite: when yield rises, price falls and duration becomes slightly shorter. In this model duration moves from 1.9541 years at 1% to 1.9524 years at 5%. A higher discount rate cuts the distant cash flow's present value more, shifting weight towards the earlier coupon.
Applying an annual formula to a semiannual bond
Most real bonds pay coupons twice a year, so the periodic yield is y/2 and the number of periods doubles. Dividing by (1 + y) instead of (1 + y/2) gives the wrong modified duration. The two-period model here is deliberately annual to keep the arithmetic readable.
Reading duration as a guaranteed holding period
Duration is a sensitivity statistic, not a promise about when capital returns. It assumes a small parallel shift in a flat yield curve and ignores curvature, credit risk and embedded options. For large yield moves add convexity, and for callable bonds use effective duration instead.
FAQ
What does Macaulay duration actually measure?
It measures the average time until a bond's cash flows arrive, weighted by the present value of each payment. A large distant payment pulls the answer towards its date; an early coupon pulls it towards today. The result is in years and is often called the average maturity of the cash flows.
Why is a coupon bond's duration shorter than its maturity?
Because some cash arrives before the final repayment. The coupons paid in earlier years carry present-value weight at earlier dates, so the weighted average falls below the maturity date. In this two-period model the default duration is 1.9532 years against a two-year maturity.
How do Macaulay and modified duration differ?
Macaulay duration is the weighted average time; modified duration divides that by one plus the periodic yield. Modified duration is the figure that estimates a price change of roughly minus modified duration times the yield change times price. At 3% here the values are 1.9532 and 1.8964 years respectively.
What happens to duration when the yield rises?
Both price and duration fall, though duration moves only slightly. In this model duration is about 1.9541 years at a 1% yield and about 1.9524 years at 5%. The higher discount rate reduces the far-off payment's present value more than the near one, so the weighting tilts towards the earlier coupon.
Does this calculator price a real, tradable bond?
No. It is a two-period teaching model with annual coupons, a flat yield and no settlement or day-count adjustments, provided for education and not investment advice. Real bonds usually pay semiannually and need accrued interest, credit spreads and option features taken into account.
What is the duration of a zero-coupon bond?
Its Macaulay duration equals its maturity, because there is only one cash flow. A two-year zero has a Macaulay duration of exactly two years and a modified duration of 2 / 1.03, about 1.9417 at a 3% yield. That second figure is the one reported alongside the main result here.
References
- [1]Wikipedia, Bond duration — https://en.wikipedia.org/wiki/Bond_duration
- [2]Wikipedia, Macaulay duration — https://en.wikipedia.org/wiki/Macaulay_duration
- [3]Wikipedia, Modified duration — https://en.wikipedia.org/wiki/Modified_duration
