Bond Calculator

Price ↔ Yield (YTM), current yield, duration, and convexity — fast, clean, and with Show Work.

How to Use

  1. Pick a mode: Price from Yield or Yield (YTM) from Price.
  2. Enter face value, coupon rate, years to maturity, and coupon frequency.
  3. Enter either the yield or the clean price (depending on mode).
  4. Open Show Work for the cashflows + discounting steps and duration math.

Note: This tool models standard fixed-coupon bonds with regular coupon periods (no call/put, no floating rate).

Results
Outputs update as you edit inputs (no URL changes).
Price
YTM
Current Yield
Mod Duration
Accrued Interest
Dirty Price
Macaulay Duration
Convexity
Enter inputs to see results.
Inputs & Settings
Standard fixed-coupon bond model. Choose what to solve for.
Common: 100, 1000
Example: 5% = 5 (or 0.05 as decimal)
Supports fractional years (e.g., 7.5)
Day count used only for accrued interest estimate.
Used to compute price (discount rate per period).
If unsure, set to 0 or choose “Ignore”.
Formatting only — calculations use full precision.
Tip: Duration and convexity are based on discounted cashflows at the computed yield.
Show Work (step-by-step)
Work uses periodic rates: y_period = y_annual / frequency. Cashflows discounted per period.

Reference

Core formulas used by this tool.

  • Coupon payment per period: C = Face × couponRate / freq
  • Price (PV): P = Σ (CF_t / (1+y)^t) where y = y_period
  • Current yield: CY = (annualCoupon) / price
  • Macaulay duration: D_M = (Σ t × PV(CF_t)) / Price (t in years)
  • Modified duration: D_mod = D_M / (1 + y_period)
  • Convexity (approx): discounted cashflow-based convexity metric
This is a simplified educational/engineering-style calculator — real bonds may include odd first/last coupons, settlement calendars, and market conventions.

FAQ

What is “clean” vs “dirty” price?

Clean price excludes accrued interest. Dirty price = clean price + accrued interest.

Why does YTM need a solver?

Because yield is inside the discount factor for every cashflow period, so the equation is nonlinear. The tool uses a numerical method to solve it.

Does this support zero-coupon bonds?

Yes — set coupon rate to 0% and it becomes a zero-coupon PV/YTM calculation.

Tool Info

Last updated:

Updates may include improved day-count handling, edge-case validation, and better export formats.