Yield to Maturity (YTM) Calculator
Yield to maturity (YTM) is the annualized rate of return anticipated on a bond if held to maturity, accounting for coupon payments and principal repayment. It is the internal rate of return that equates the present value of the bond's future cash flows to its current price.
This tool provides two options: a numerical solver that finds the exact IRR for the bond price equation and a standard approximation useful for quick estimates. Use the numerical method for pricing, risk calculations, or regulatory reporting; use the approximation only for rough comparisons.
Finds the internal rate of return that sets the present value of future coupon and principal payments equal to the bond price. This method uses a root-finding algorithm on the price equation and returns an annualized yield. Numerical tolerance, iteration limits, and day-count conventions affect results. The front-end implementation must perform iterative solving (bisection, secant, or Newton-Raphson) and enforce safeguards for convergence.
Inputs
Results
Yield to maturity (annual, nominal)
—
Yield per period (numeric)
—
Coupon payment per period
2.5
Total periods
20
| Output | Value | Unit |
|---|---|---|
| Yield to maturity (annual, nominal) | — | % |
| Yield per period (numeric) | — | % |
| Coupon payment per period | 2.5 | currency |
| Total periods | 20 | periods |
Visualization
Methodology
Exact (numerical) method: solve the present-value equation sum_{t=1..N} C/(1+y)^t + F/(1+y)^N = P for the periodic yield y, then annualize by multiplying by payment frequency. The front-end must use a stable root-finding algorithm, limit iterations, and enforce a convergence tolerance.
Approximate (rule-of-thumb) method: approximate periodic yield = [C + (F - P)/N] / [(F + P)/2], then annualize. This linearized approximation is fast but loses accuracy when coupons or yields are large or when price deviates markedly from par.
Accuracy, rounding, and numeric stability: implement IEEE 754 compliant arithmetic for consistent floating-point results, and follow numerical best-practices (bracketing, fallback to bisection if Newton steps diverge). Document solver tolerances and iteration limits in any downstream report.
Worked examples
Example: Face 100, price 95, coupon 5% paid semiannually (2), years 10. C = 2.5, N = 20. Approx periodic yield = (2.5 + (100-95)/20)/((100+95)/2); approximate annual YTM is periodic*2.
Exact method numerically solves the price equation and will produce a slightly different annualized YTM; use the exact method for valuation or comparison to market YTM quotes.
Further resources
External guidance
Expert Q&A
Do I enter price as a percent or currency?
Enter price in the same units as face value. For a typical market quote where face=100, enter 95 for a price quoted at 95.00. The calculator assumes a clean price; accrued interest is not added automatically.
Which method should I use?
Use the numerical (Exact) solver for pricing, risk modeling, or when precision is required. Use the Approximate method for quick, back-of-envelope comparisons. The approximation can differ materially for deep discounts/premiums or high coupon rates.
How accurate is the numerical solver?
Accuracy depends on the chosen numeric tolerance and floating-point arithmetic. Follow IEEE 754 guidelines for floating-point handling, limit iterations to avoid runaway loops, and report solver tolerance. Expect small rounding differences across implementations.
Does this handle callable or putable bonds?
No. Call and put features change cash flow timing and must be modeled with option-aware valuation (e.g., option-adjusted spread models). This calculator handles plain vanilla fixed-coupon bonds only.
Are day-count conventions considered?
This calculator assumes full-period coupon timing based on 'payments per year' and does not apply day-count convention adjustments. For settlement-to-maturity date calculations adjust cash flows externally or use an instrument-specific calculator.
Sources & citations
- IEEE Standard for Floating-Point Arithmetic (IEEE 754) — https://standards.ieee.org/standard/754-2019.html
- International Organization for Standardization — ISO 31000 Risk Management — https://www.iso.org/iso-31000-risk-management.html
- National Institute of Standards and Technology (NIST) — https://www.nist.gov
- U.S. Securities and Exchange Commission — Bonds and Bond Basics — https://www.sec.gov
- Occupational Safety and Health Administration (OSHA) — https://www.osha.gov