What this bond calculator does
This tool handles the two most common bond questions. In Bond Price mode, you supply the bond indenture (face value, coupon, maturity, frequency) plus a required market yield, and the calculator returns the fair price as the present value of all future coupon payments plus the present value of the face amount paid at maturity. In Yield to Maturity mode, you supply the current market price along with the indenture, and the calculator iterates to find the discount rate that makes the present value of cash flows equal to that price. Both modes also produce Macaulay and modified duration, period-by-period cash flows, and a chart that visualizes either the cash flow schedule or the price-yield relationship.
How to Calculate Bond Price
The price of a bond is the present value of every future cash flow, discounted at the required yield. Each period the bond pays a coupon equal to (coupon_rate / frequency) × face_value, and at the final period it also pays back the face amount. The discount factor for period t uses the per-period yield y/m, where m is the number of coupon periods per year.
The summation formula in code form:
Price = Sum from t=1 to n of [ C / (1 + y/m)^t ] + F / (1 + y/m)^n
where C is the coupon per period, F is face value, y is the annual required yield, m is the compounding frequency per year, and n = years × m.
In MathML:
How to Calculate Yield to Maturity
Yield to maturity is the y that solves the equation above for a given market price P. There is no closed-form solution, so the calculator uses a numeric bisection method: it brackets the answer between a very low rate and a very high rate, computes the price at the midpoint, and narrows the bracket based on whether that price is too high or too low. Within a couple of dozen iterations it converges to many decimal places of precision.
In MathML the equation being solved:
The result is annualized by multiplying the per-period solution by m.
Premium versus discount bonds
Bond prices and yields move in opposite directions. When you discount a fixed coupon stream at a lower rate, every term in the summation grows larger, so the price exceeds face value — the bond trades at a premium. When the required yield rises above the coupon rate, every term shrinks and the price falls below face — a discount. At maturity the bond still pays face, so premium bonds amortize down to par and discount bonds accrete up. The pull-to-par dynamic is mathematically guaranteed if the issuer does not default.
Duration and interest rate risk
Macaulay duration is the weighted average time to receive a bond's cash flows, with weights equal to each cash flow's present value share of the total price. Modified duration converts this into a price sensitivity: %price_change ≈ -modified_duration × change_in_yield. A bond with modified duration of 8 will lose roughly 8% of its price if yields jump 1 percentage point. Higher coupons reduce duration because more cash arrives early; longer maturities and lower coupons extend it. Zero-coupon bonds have duration equal to maturity — they're the most rate-sensitive instruments per unit of face.
Key Concepts and Definitions
- Face value (par): the amount returned at maturity, almost always $1,000 for retail US bonds.
- Coupon rate: the fixed annual interest rate applied to face value.
- Coupon payment: coupon rate divided by frequency, multiplied by face value — the dollar amount paid each period.
- Maturity: the date the issuer repays the face value.
- Yield to maturity: the IRR of holding to maturity at the current price.
- Yield to call: the IRR if the bond is called on the first call date.
- Yield to worst: the minimum of YTM and any yield to call dates — the conservative measure.
- Current yield: annual coupon divided by current price; ignores capital gain or loss to maturity.
- Accrued interest: the coupon interest earned but not yet paid since the last coupon date; added to the quoted price when settling.
- Clean price vs dirty price: the clean (quoted) price excludes accrued interest; the dirty price is what you actually pay.
Types of bonds — comparison
| Type | Issuer | Typical maturity | Tax notes | Risk |
|---|---|---|---|---|
| Treasury bills | US Treasury | 4 to 52 weeks | Federal taxable, state exempt | Essentially zero default risk |
| Treasury notes | US Treasury | 2 to 10 years | Federal taxable, state exempt | Rate risk only |
| Treasury bonds | US Treasury | 20 to 30 years | Federal taxable, state exempt | High rate risk, no default risk |
| Municipal bonds | State and local governments | 1 to 30 years | Generally federal tax exempt | Issuer default possible |
| Corporate bonds | Corporations | 1 to 30 years | Fully taxable | Credit risk varies by issuer |
| Agency bonds | Fannie Mae, Freddie Mac, FHLB | Wide range | Federal taxable; some state exempt | Implicit federal backing for most |
| Savings bonds | US Treasury (retail) | Up to 30 years | Federal taxable, state exempt | None; non-marketable |
| Zero-coupon bonds | Various | Wide range | Phantom income taxed annually | Highest duration per unit |
Credit ratings and investment grade
Investment grade spans AAA down to BBB- on the S&P / Fitch scale (Aaa to Baa3 at Moodys). Below that — BB+ and lower — is speculative or high yield. Investment grade issuers default rarely; high yield issuers default in clusters tied to the business cycle. Pension funds, insurance companies and many bond funds have charters that forbid holding below investment grade. A downgrade across that boundary is a "fallen angel" event and can move prices sharply as forced sellers exit.
Current yield vs YTM vs yield to call
Current yield (see interest rate basics) divides annual coupon by current price — useful as a quick income measure but it ignores the pull-to-par capital gain or loss. YTM captures all cash flows assuming hold to maturity and is the standard quoted yield. Yield to call assumes the issuer exercises an early redemption right at the first call date; for callable bonds trading above call price this is often lower than YTM and is the rate a prudent investor uses. Always check whether a quoted "yield" is YTM, YTC, current or yield to worst.
Edge cases and advanced scenarios
- Callable bonds. If a bond is callable on a known schedule, run the calculator twice — once with maturity equal to the call date (price = call price) and once with full maturity — and compare. The lower yield is the realistic expectation if rates have fallen.
- Zero-coupon bonds. Set the coupon rate to 0%. Price simplifies to
F / (1 + y/m)^nand Macaulay duration equals maturity. These are pure interest rate plays. - Bonds trading at par. If required yield equals coupon rate, price equals face value exactly and YTM equals the coupon. The summation telescopes to F.
- Very short maturities. Treasury bills are typically quoted on a discount basis, not yield. The price formula here still applies, but published "bank discount yields" are not the same number as YTM — you can convert with present value tools.
- Floating-rate notes. The model here assumes a fixed coupon. For FRNs you would re-price every reset date, so duration is effectively the time to next reset, not maturity.
What To Do With Your Result
- Compare price to face value. Above 100 of face is a premium, below is a discount, and that has tax and cash-flow implications.
- Use modified duration to size positions. If your tolerance is a 5% drawdown and modified duration is 10, a 0.5% rate shock is your limit.
- Stack the result against alternatives. Compare YTM against current high-yield savings, brokered CDs, and long-run equity returns.
- Build a ladder. Use the calculator on each rung to verify expected income and reinvestment risk across maturities.
- Plan reinvestment. If duration matches your time horizon, you are immunized against parallel rate moves; if not, run sensitivity scenarios.
Federal versus state taxation
One of the most overlooked features of US bonds is the differing tax treatment by issuer. Treasury bonds pay interest that is exempt from state and local income tax — a meaningful advantage in high-tax states. Municipal bonds flip this: the interest is generally exempt from federal income tax and, if you live in the issuing state, often exempt from state tax too. Corporate bonds get no break at any level. Compare bonds on a taxable-equivalent yield basis: divide a muni yield by (1 - your marginal rate) to see what taxable yield it matches.
Bond laddering in practice
A laddered portfolio holds bonds with staggered maturities, often one rung per year. As each matures, the proceeds buy a new rung at the longest end. The ladder smooths out reinvestment risk because no single year's prevailing rate dictates the whole portfolio's return. Ladders pair naturally with goals that have predictable annual cash needs — retirement spending, school tuition, scheduled CapEx — and complement broader allocation tools like the retirement calculator, loan calculator and mortgage calculator when planning long-term cash flow.
Limitations of this calculator
The model assumes a flat yield curve (one discount rate for all maturities), no defaults, no embedded options beyond simple call analysis you run yourself, and constant coupons. It does not handle inflation-linked bonds (TIPS) where principal adjusts, convertible bonds with equity options, or step-up coupons. For those instruments use specialist tools or consult issuer documentation. As a baseline tool for vanilla fixed-coupon bonds, however, the price and YTM computations match standard textbook and Bloomberg-style formulas.