Bond calculator

Price a coupon bond and review dirty and clean price, approximate YTM, and Macaulay and modified duration.

Enter face value, the annual coupon rate, the market discount rate, years to maturity, accrued days, and how often coupons are paid. Discounting uses the chosen frequency; accrued interest uses 30/360. Figures are theoretical and for information only.

Results

Dirty price
—
Accrued interest
—
Clean price
—
YTM (%)
—
Macaulay duration
—
Modified duration
—

How the coupon bond is priced

Each remaining coupon and the face value at maturity are discounted at the market rate, using the coupon frequency you selected. That present value is the clean price. Dirty price adds accrued interest for the current coupon period.

Clean = F / (1 + r/p)n + Cperiod × [1 − (1 + r/p)−n] / (r/p)

  • F — face (par) value
  • r — market discount rate in decimal form
  • p — coupons per year (1, 2, 4, or 12)
  • n — remaining periods (years × p)
  • Cperiod — coupon paid each period, F × (coupon % / 100) / p

Accrued interest uses 30/360: face times the period coupon times accrued days divided by (360 / p). Approximate YTM is (annual coupon + (face − dirty price) / years) divided by the average of face and dirty price. Macaulay duration weights each cash-flow date by its present value; modified duration is Macaulay duration divided by (1 + YTM / p). Prices round to two decimals, YTM and durations to three, matching the results panel.

Worked examples

These cases use the same formulas and rounding as the calculator above. Type the inputs in and you should get the same dirty price and YTM.

1-year 10% coupon at 1%

Face 1,000, 10% coupon, 1% market rate, 1 year, annual payments, no accrual. A rich coupon above the market rate pushes the price well over par.

Dirty / clean price
1,089.11
YTM
1.043%
Macaulay / modified
1.000 / 0.990

10-year 5% coupon at 4%

Face 1,000, 5% coupon, 4% market rate, 10 years, semi-annual, no accrual. The bond trades at a premium and duration is shorter than maturity because coupons arrive early.

Dirty / clean price
1,081.76
YTM
4.018%
Macaulay / modified
8.079 / 7.920

5-year 6% with 45 days accrued

Face 100,000, 6% coupon, 5% market rate, 5 years, semi-annual, 45 accrued days. Dirty price sits above clean price by the 750 of accrued interest.

Dirty price
105,126.03
Accrued / clean
750.00 / 104,376.03
YTM
4.85%

A coupon bond is one way a yield shows up in a price. Zeros have no coupon, a mortgage amortizes principal monthly, and option tools use a rate as an input rather than a quoted yield.

Bond pricing FAQ

Clean price is the present value of remaining coupons and face value, discounted at the market rate. Dirty price is that clean price plus accrued interest since the last coupon. If accrued days are zero, dirty and clean prices are the same, as in the first two examples above.

The calculator uses a 30/360 day-count. Accrued interest is face times the coupon per period times accrued days divided by the length of a coupon period in that convention (360 divided by payment frequency). Coupon per period is the annual coupon percent times face, divided by 100 times frequency.

No. YTM is a closed-form approximation: (annual coupon plus the average annual capital gain or loss) divided by the average of face and dirty price. It is not solved by root-finding, so it can differ from a true internal rate of return, especially for long or deeply off-market bonds. The 10% coupon priced at a 1% discount rate shows that gap: approximate YTM is 1.043%, not exactly 1%.

Macaulay duration is the present-value-weighted average time of the remaining cash flows, in years. Modified duration is Macaulay duration divided by one plus yield per coupon period, and estimates the percent price change for a one percentage point change in yield.

Use the contractual schedule: annual, semi-annual (common for US Treasuries and many corporates), quarterly, or monthly. Frequency changes both the discounting grid and the coupon amount per period.

Dealers may use actual/actual or another day-count, compound differently, quote a true IRR rather than this YTM approximation, or include fees. Settlement conventions and ex-coupon rules are not modelled. Figures are theoretical and for information only.

Use the zero-coupon bond calculator instead. That page discounts face value only, so duration equals maturity and there is no accrued coupon.

Disclaimer: the contents of this website are for informational purposes only and do not constitute any investment recommendation. The visitor acts at his own risk.