{"uid":"cap_8BYiU-jLFNycgZ-ZXHPD0","slug":"bond-yield-to-maturity-calculator-0d4aac06","name":"Bond Yield to Maturity Calculator","description":"Solve a bond's yield to maturity from its market price - the annual rate that present-values the coupons plus face to that price. Bracketed bisection root-find.","url":"https://agent402.tools/api/bond-ytm","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"price":{"type":"number","description":"Current market (clean) price"},"years":{"type":"number","description":"Years to maturity"},"faceValue":{"type":"number","description":"Par/face value"},"couponRate":{"type":"number","description":"Annual coupon rate as decimal"},"periodsPerYear":{"type":"number","description":"Coupon periods per year. Default 2."}}},"responseSchema":{"type":"json","example":{"periods":20,"converged":true,"yieldToMaturity":0.06}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cLG3LaxtobHcyV5OxcC-A","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the yield to maturity (YTM) of a bond given its market price, coupon rate, face value, and time to maturity using bracketed bisection root-finding.","exampleAgentPrompt":"What's the yield to maturity on a bond with a face value of $1000, a 6% annual coupon paid semiannually, 10 years to maturity, currently trading at $950?","exampleUseCases":null,"resultDescription":"Returns the yield to maturity as an annual rate (decimal or percentage) — the internal rate of return that equates the present value of all future coupon payments and face value repayment to the given market price.","failureModes":["Missing required fields (price, years, faceValue, couponRate) returns a 400-level error","Non-convergence if price is outside plausible bounds for the bisection bracket","Negative or zero years/faceValue causing arithmetic errors","Invalid couponRate (e.g. >1 treated as a percentage rather than decimal) may produce unrealistic YTM","periodsPerYear of 0 causes division error"],"whenToPreferThis":"Use this endpoint when you need to solve for a bond's implied yield to maturity from its observed market price — particularly when you want a numerically robust root-finding approach (bisection) rather than an approximation formula. Ideal for fixed-income analysis, portfolio evaluation, or comparing bonds on a yield basis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:02:58.028Z","isFirstParty":false}