Bond Calculator

Use this Bond Calculator to solve for either a bond’s clean price (given yield to maturity) or its yield to maturity (given clean price), using the same cash flow math. You will also see coupon payment, current yield, duration, DV01, and an optional accrued interest (clean vs dirty) estimate.

Choose what you want to calculate: the bond’s clean price or its yield to maturity (YTM). The other field becomes required.
The amount paid back at maturity, often $1,000 per bond.
The yearly interest rate paid on face value. Example: 5% on $1,000 means $50 per year in coupons.
How many years until the bond pays back face value.
How often coupons are paid. Many US bonds pay twice per year (2). Options: 1 (annual), 2 (semiannual), 4 (quarterly), 12 (monthly).
Advanced options
Price or yield details
Required when solving for price. This is the yearly yield used to discount cash flows under the chosen compounding convention.
Price excluding accrued interest. Required when solving for YTM.
Used only to help the solver converge faster when solving for YTM. It does not change the correct answer.
If Yes, the solver can return negative YTM (rare, but possible). If No, yields are restricted to 0% and above.
How the yield is applied in discounting. Most standard bond pricing uses yield compounded at the coupon frequency (per period).
Accrued interest (clean vs dirty)
If Yes, the calculator estimates accrued interest using settlement date and coupon schedule inputs, then shows dirty price = clean price + accrued interest.
The date the buyer officially takes ownership. Accrued interest is based on this date (only used if accrued interest is enabled).
Most recent coupon payment date before settlement (only used if accrued interest is enabled).
Next coupon payment date after settlement (only used if accrued interest is enabled).
Rule for counting days when calculating accrued interest. Common choices: 30/360 (US), Actual/Actual (ISDA), Actual/360, Actual/365.
Note: Accrued interest is estimated from the provided dates. The price and YTM math uses the period model (1..N payments) for discounting.
Coupon payment per period (USD)
–
Computed from face value, coupon rate, and payments per year.
Current yield (percent per year)
–
Annual coupon dollars divided by clean price. It ignores the gain or loss from moving toward face value at maturity.
Macaulay duration (years)
–
Weighted average time to receive cash flows. Longer usually means more sensitivity to yield changes.
Modified duration (years)
–
Approx percent price change for a 1.00% yield change (for small changes). Example: 7 means about 7% down if yield rises 1%.
DV01 (USD per 0.01%)
–
Approx dollar price change for a 1 basis point (0.01%) change in the quoted annual yield.
Cash flow schedule (summary)
Table
Sum of present values should match the clean price (within rounding).
Did we solve your problem today?

How to use our Bond Calculator

  1. Pick Solve for: choose Price (given yield) or YTM (given price).
  2. Enter Face value (USD) (often 1000) and Annual coupon rate (percent) (example: 5 means 5% per year).
  3. Enter Years to maturity (years) and choose Coupon payments per year (1, 2, 4, or 12).
  4. If solving for price, enter Yield to maturity (YTM) (percent per year).
  5. If solving for YTM, enter Current clean price (USD). (Clean price is the quoted price that excludes accrued interest.)
  6. Optional: open Advanced options and turn on Include accrued interest if you want an estimated dirty price too.
  7. If accrued interest is on, enter Settlement date, Last coupon date, Next coupon date, and a Day count convention.
  8. Click Calculate. Use the cash flow table to confirm the present values add up to the clean price (small rounding differences are normal).

Definitions

Bond: A loan you give to an issuer. You get coupon payments and then your face value back at maturity.

Face value (par): The amount paid back at maturity (like 1000 USD).

Coupon rate: The yearly interest percent of face value that sets the coupon dollars you receive.

Coupon payment (per period): The coupon dollars paid each payment period (for example, every 6 months if payments per year is 2).

Yield to maturity (YTM): The single yearly rate that makes the present value of all future payments equal the bond's clean price, assuming you hold to maturity. [1]

Discounting (present value): Converting future dollars into an equivalent value today using a yield (a discount rate).

Clean price: Bond price excluding accrued interest (this is often what is quoted).

Dirty price: Clean price plus accrued interest (this is closer to the cash you pay at settlement).

Accrued interest: Coupon interest earned since the last coupon date up to settlement.

Current yield: Annual coupon dollars divided by clean price; it ignores the extra gain/loss from moving toward face value by maturity. [2]

Duration: A time-based measure used to estimate how sensitive price is to yield changes (higher duration usually means more sensitivity).

DV01: Approximate dollar price change for a 1 basis point (0.01%) change in yield.


Methodology

What this calculator prices

This tool is for standard coupon bonds with level coupon payments and face value paid at maturity (not US savings bond redemption values). YTM is computed as the discount rate that matches the clean price. [1]

Inputs and setup

payments_per_year must be one of {1, 2, 4, 12}

N = years_to_maturity * payments_per_year (must be a whole number)

coupon_per_period = face_value * (coupon_rate_annual/100) / payments_per_year

Price from yield (clean price)

If the yield compounding convention is compounded per coupon period, the per-period yield is the annual quoted yield divided by payments per year.

y_per_period = (ytm_annual/100) / payments_per_year

clean_price = sum_{k=1..N} [ CF_k / (1 + y_per_period)^k ]

CF_k = coupon_per_period (for k < N), and CF_N = coupon_per_period + face_value

Yield to maturity (solve from clean price)

When solving for YTM, the calculator finds the annual yield that makes the model price match the target clean price. It uses a robust bracketed root find (bisection, with an optional Newton step for speed). If negative yields are not allowed and the implied yield would be negative, the tool returns N/A with an explanation. [1]

Find ytm_annual such that price_from_yield(ytm_annual) - target_clean_price = 0

Current yield

Current yield is a simple ratio (it is not the same as YTM). [2]

current_yield_percent = (face_value * (coupon_rate_annual/100) / clean_price) * 100

Accrued interest and dirty price (optional)

If you enable accrued interest, you must provide settlement, last coupon, and next coupon dates, with last_coupon_date < settlement_date <= next_coupon_date. The calculator estimates the fraction of the coupon period that has passed using the selected day count convention, then multiplies by the coupon per period.

accrued_interest = coupon_per_period * (accrual_days / coupon_period_days)

dirty_price = clean_price + accrued_interest

Duration and DV01 (rate sensitivity)

Macaulay duration is computed from the same period-based present values used in pricing. Modified duration adjusts Macaulay duration to better approximate price sensitivity for small yield moves.

PV_k = CF_k / (1 + y_per_period)^k

D_mac_years = (1/payments_per_year) * [ sum_{k=1..N} (k * PV_k) ] / clean_price

D_mod_years = D_mac_years / (1 + y_per_period)

DV01 is computed with a symmetric 1 basis point bump to the quoted annual yield (more stable than a single-sided bump).

1bp = 0.0001 (decimal annual yield)

dv01 = abs( (P(y - 1bp) - P(y + 1bp)) / 2 )

Cash flow schedule (summary table)

The table lists each period's cash flow and its present value at the computed yield. The sum of present values should match the clean price within rounding.


Sources