### Example

In the example shown, we want to calculate the yield of a bond with a last interest date of 15-Oct-2017 and a settlement date of 5-Feb-2018. The bond matures on 15-Jun-2018, and pays a coupon rate of 5%. Payments are semi-annual, the day count basis is US 30/360, and the redemption value is $100. In the example shown, the formula in F5 is: With these inputs, the ODDLYIELD function returns 6.32%, with the percentage number format applied.

### Entering dates

In Excel, dates are serial numbers. Generally, the best way to enter valid dates is to use cell references, as shown in the example. To enter valid dates directly inside a function, the DATE function is the best option. To illustrate, the formula below has all values hardcoded, with the DATE function used to enter the three required dates:

### Basis

The basis argument controls how days are counted. The ODDLYIELD function allows 5 options (0-4) and defaults to zero, which specifies US 30/360 basis. This article on Wikipedia provides a detailed explanation of available conventions.

### Notes

In Excel, dates are serial numbers. All dates, plus frequency and basis, are truncated to integers. If any dates are invalid (i.e. not actually dates) ODDLYIELD returns #VALUE! ODDLYIELD returns #NUM when: (maturity > settlement > last_interest) is NOT true rate < 0 or pr <= 0 basis is out-of-range

### Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.