Bond yield in Excel and Google Sheets: the YIELD function step by step
By the 10BONDS editorial team · Reviewed on by 10bonds Analyst ·
Excel has a function for this, which is just as well, since a bond's yield to maturity can only be found by trial and error. The function is called YIELD, it also exists in Google Sheets, and it is used by people who would rather not be woken up by an equation. If you only need one answer, the online calculator gives it in a second; if you need a hundred, here is how to set up the sheet.
The syntax
=YIELD(settlement, maturity, rate, pr, redemption, frequency, [basis])
- settlement: the date you buy, as a real date, not text.
- maturity: the repayment date.
- rate: the annual coupon as a decimal (0.0425 for 4.25%).
- pr: the clean price per 100 of face value.
- redemption: the repayment per 100, normally 100.
- frequency: coupons per year: 1, 2 or 4.
- basis: the day count; 0 is the US 30/360, 1 is actual/actual.
An example you can check
A note with a 4.25% semi-annual coupon, bought at 98.5 on 15 November 2026 and repaid on 15 November 2036:
=YIELD(DATE(2026,11,15), DATE(2036,11,15), 0.0425, 98.5, 100, 2, 1)
The answer is about 0.0444, or 4.44%. The calculator, on the same inputs, returns the same figure: open it and compare. The function gives the yield with the coupons compounding at the coupon frequency, the market convention.
The alternative: IRR
If the bond's cash flows are irregular, or you want to see them, list them in a column: the negative price (plus accrued interest) at the start, each coupon, and the coupon plus repayment at the end. =IRR(range) returns the rate per period; multiply it by the number of coupons a year to quote it as an annual yield. For payments on irregular dates use XIRR, which returns an effective annual rate and will differ a little from the quoted yield.
Common mistakes
- Dates typed as text. Excel returns an error. Use DATE() or format the cells as dates.
- Coupon as 4.25 rather than 0.0425. The function does not know you meant percent.
- Dirty price in the pr argument. YIELD expects the clean price and handles accrued interest itself.
- Wrong frequency. A gilt or a Treasury is 2, a Bund is 1.
After tax
The function has no tax argument. A workaround is to apply the tax to the coupon and the gain yourself and use IRR on the reduced flows, or use the calculator, which does it with a field for your rate.
Frequently asked questions
Which Excel function calculates a bond's yield to maturity?
YIELD, with settlement, maturity, rate, price, redemption, frequency and an optional day-count basis. The same function exists in Google Sheets.
Why does YIELD return an error?
Usually because a date is text, the settlement date is after maturity, or the coupon is entered as a whole number rather than a decimal.
Is the YIELD result the same as the yield on my broker's screen?
It should match to the first decimal; the second can differ with the day count basis and the exact coupon dates.
Can I calculate a bond's yield without Excel?
Yes. An online bond yield calculator does the same calculation from price, coupon and maturity.
Try it: open the bond yield calculator. Enter price, coupon and maturity and read the result in a second. Nothing leaves your browser.
Next: see the 10 bonds the model selects for the maturity and return you choose.
Educational information only, not a personal recommendation. Prices, yields and tax rules change: check the official source.
Revision log
- : Published