How to Yieldmat Function in Excel
Learn multiple Excel methods to calculate the yield of a security that pays interest at maturity (YIELDMAT) with step-by-step examples and practical applications.
How to Yieldmat Function in Excel
Why This Task Matters in Excel
Bond pricing and yield analysis sit at the heart of corporate treasury, portfolio management, and fixed-income research. One of the most common instruments you will encounter is a discount security or zero-coupon note that accrues interest but pays everything back—principal plus interest—on the maturity date. Unlike a plain-vanilla coupon bond, these instruments have no interim cash flows, making their valuation and yield calculations slightly different.
Knowing how to compute the annual yield of such a security helps you answer vital questions:
- Investor perspective
- “If I buy this Treasury bill for 97 cents on the dollar and hold it until maturity, what is my effective annual return?”
- “How does that return compare with alternative investments like money-market funds or comparable corporate notes?”
- Issuer perspective
- “At what discount rate do we need to issue a 270-day commercial paper note to hit our target cost of capital?”
- “How will that cost change if the settlement date is pushed out by a week?”
- Audit and compliance
- Regulators and auditors often ask for documented yield calculations. An incorrect figure could misstate interest expense, impair asset-liability management models, or trigger covenant breaches.
- Risk management
- Duration, value at risk, and scenario stress testing rely on the yield as a core building block. A mis-calculated yield will contaminate every downstream metric in the risk stack.
Excel shines in this domain because it is ubiquitous, transparent, and flexible. A well-structured workbook can instantly recompute yields across hundreds of instruments when settlement dates or market prices update. If you try to approximate the yield manually or with an ad-hoc method, you risk using inconsistent day-count conventions, overlooking odd first periods, or simply making arithmetic slips. Mastering YIELDMAT connects to other Excel skills (DATE functions, day-count analytics, data validation, scenario tables) and removes a critical bottleneck in fixed-income workflows.
Best Excel Approach
Excel has a dedicated function—YIELDMAT—expressly designed to calculate the annual yield of a security that pays interest at maturity. It incorporates all required bond math in one tidy formula, handling settlement and maturity dates, issue price, redemption value, annual coupon, and day-count convention.
Why choose YIELDMAT over DIY calculations?
- Accuracy: Microsoft’s implementation follows industry day-count standards and compounding assumptions.
- Convenience: No need to build intermediate discount factors or compounding equations.
- Flexibility: Change any input cell and the yield updates automatically.
- Auditability: Anyone versed in Excel finance functions can peer-review the workbook.
Syntax:
=YIELDMAT(settlement, maturity, issue, rate, pr, basis)
Parameter guide:
- settlement – date you take ownership of the security
- maturity – date the security matures
- issue – original issue date
- rate – annual coupon rate stated on the security (expressed as decimal, 5 percent → 0.05)
- pr – purchase price per 100 face value
- basis – (optional) day-count basis code: 0 = US 30/360, 1 = Actual/Actual, 2 = Actual/360, 3 = Actual/365, 4 = European 30/360
Alternative when you have coupon bonds: YIELD, and for Treasury bills that quote on a bank discount basis: YIELDDISC. We will revisit these in the Alternative Methods section.
Parameters and Inputs
Getting the inputs right is crucial; a single typo can swing the yield by several percentage points.
-
Date inputs (settlement, maturity, issue)
– Must be valid Excel serial dates. UseDATE(year, month, day)or reference a cell formatted as Date.
– Settlement must be on or after the issue date and strictly before maturity.
– Excel stores dates as numbers; treat them carefully in CSV imports where dates may arrive as text. -
Rate (annual coupon)
– Even if the security pays interest only at maturity, it still has a stated rate. Example: a zero-coupon Treasury STRIP has rate 0. Enter 0.000 or leave the cell blank and reference 0 in the formula. -
Price (pr)
– Enter the clean price per 100 face value. A price of 97.50 means you pay 97.50 for every 100 of par.
– The price must be positive and should not include accrued interest because a “paid at maturity” bond accrues nothing until the final day. -
Basis (optional)
– Defaults to 0 (US 30/360) if omitted, but government bills often use Actual/360 or Actual/365. Confirm with your term sheet.
– In mixed portfolios, place basis codes in a dedicated column so you can filter and audit later.
Validation tips
- Add Data Validation rules that reject settlement dates outside the issue-to-maturity window.
- Use
ISNUMBERandISERRORwrappers to flag imported text dates. - Protect formula cells to prevent accidental overwrites.
Edge cases
- Leap-year spans can slightly shift yields under Actual/365 vs Actual/360.
- Securities with rate 0 can still deliver non-zero YIELDMAT results based purely on price discount.
Step-by-Step Examples
Example 1: Basic Scenario
Imagine you are buying a 1-year zero-coupon Treasury note.
Sample data in the worksheet
- Settlement: 2024-03-15 (cell B2)
- Maturity: 2025-03-15 (cell B3)
- Issue date: 2024-03-15 (cell B4)
- Stated rate: 0 (cell B5)
- Price: 97.50 (cell B6)
- Basis: 1 (Actual/Actual) (cell B7)
Step-by-step:
-
Enter dates with the
DATEfunction to guarantee serial numbers:
=DATE(2024,3,15)in B2, B3, and B4 respectively (adjust year in B3 to 2025). -
In B8, create the formula:
=YIELDMAT(B2,B3,B4,B5,B6,B7)
- Press Enter. Excel returns 0.025619 (roughly 2.56 percent).
Explanation
YIELDMAT first computes the amount payable at maturity: 100 plus any coupon (rate × face value), which here is just 100. It then calculates the annual yield that equates the purchase price 97.50 with the maturity payment, considering Actual/Actual day counts between settlement and maturity.
Common variations
- If the security had a 4 percent coupon but still paid only at maturity, set B5 to 0.04.
- Change the basis to 2 (Actual/360) and observe the yield increase slightly because the denominator (days in year) shrinks.
Troubleshooting
- A
#NUM!error usually means settlement ≥ maturity or an invalid basis code. - A
#VALUE!error often indicates a date entered as text; apply Date format or wrap withDATEVALUE.
Example 2: Real-World Application
Scenario: Your firm’s cash desk wants to invest excess liquidity in discounted commercial paper (CP). The CP has a 270-day maturity.
Business context
- Treasury group buys CP at settlement date 2024-04-01.
- Issue date was 2024-03-25.
- Maturity date is 2024-12-20.
- Stated rate is 3.75 percent (interest accrues but is only paid at maturity).
- Market price quoted: 98.20.
- Basis: Actual/360 (code 2) is standard for CP.
Worksheet setup
Column A lists the field names, Column B holds the inputs.
After entering the data, place the formula in B8:
=YIELDMAT(B2,B3,B4,B5,B6,B7)
The result is 0.049968 or roughly 4.997 percent.
Business impact
The CP’s effective annual yield (nearly 5 percent) beats the firm’s revolving credit facility rate of 4.4 percent, making it an attractive short-term investment.
Integration with other Excel features
- Use Conditional Formatting to flag yields above a target hurdle rate.
- Build a table of multiple CP issues. Convert the range to an official Excel Table and copy the formula down automatically.
- Add a PivotTable to group instruments by counterparty and average the yields.
Performance considerations
For 5,000 CP lines, YIELDMAT recalculations remain instant on modern hardware. However, inserting volatile functions like TODAY() in settlement or maturity columns can trigger full recalcs; instead store settlement date in a fixed cell and update daily through VBA or Power Query.
Example 3: Advanced Technique
Goal: Stress-test a portfolio of structured notes with odd-first periods and mixed day-count conventions.
Data layout
- Table
tblNoteswith columns: Settlement, Maturity, Issue, StatedRate, Price, Basis. - 1,000 rows covering securities across USD, EUR, and JPY, each with varying issue dates and day-count bases.
Advanced steps
- Create a helper column
Yieldwith the structured reference:
=YIELDMAT([@Settlement], [@Maturity], [@Issue], [@StatedRate], [@Price], [@Basis])
- Add another column
StressedPricewhere you subtract 1.5 points to model a market shock.
=[@Price]-1.5
- Calculate stressed yield:
=YIELDMAT([@Settlement], [@Maturity], [@Issue], [@StatedRate], [@StressedPrice], [@Basis])
- Compute the yield change in basis points:
=([@StressedYield]-[@Yield])*10000
- Use the Data Model and Power Pivot to aggregate average basis-point shifts by currency and issuer rating.
Performance optimization
- Disable automatic calculation, switch to Manual, and press F9 once the inputs are ready.
- Use
Numberformats, notGeneral, to prevent implicit conversions. - If workbook size balloons, offload historical scenarios to Power Query and retain only the live scenario in the sheet.
Error handling
Wrap YIELDMAT inside IFERROR to default to blank or “Input Error” when any field is missing:
=IFERROR(YIELDMAT([@Settlement], [@Maturity], [@Issue], [@StatedRate], [@Price], [@Basis]),"Input Error")
Professional tips
- Store basis codes in a small lookup table with descriptive text so analysts can filter “Actual/365” instruments quickly.
- Lock the Issue, Settlement, and Maturity columns to preserve date integrity; allow editing only in Price cells for scenario analysis.
Tips and Best Practices
- Keep dates in ISO format (yyyy-mm-dd) to avoid regional confusion and apply a strict date format in the column.
- Separate assumptions (basis, rate) into dedicated columns; avoid hard-coding them in the formula so you can audit later.
- Use Excel Tables; they automatically copy YIELDMAT formulas and expand as you add rows, reducing manual drag errors.
- For dynamic settlement dates, reference a single cell (e.g., B1 for “As of date”) rather than embedding
TODAY(), controlling recalculation explicitly. - Combine YIELDMAT with
ROUNDto four decimal places for presentation, but store the raw value for calculations to avoid cumulative rounding bias. - Document the source of each input (term sheet, Bloomberg ticker) in a hidden note or adjacent column; future reviewers will thank you.
Common Mistakes to Avoid
- Mixing up price and rate
– Users sometimes enter 0.9820 instead of 98.20. Catch this by adding Data Validation that demands price greater than 20. - Using text dates
– A pasted “2024/03/15” string will break the formula. Confirm withISTEXTor convert withDATEVALUE. - Ignoring the basis parameter
– Default basis 0 may not match the instrument. Always check the term sheet; using the wrong basis can mis-state yield by several basis points. - Settlement equals maturity
– Even a 1-day overlap triggers#NUM!. Build a rule:=IF(B2>=B3,"Invalid dates","")to flag the problem immediately. - Accidentally locking references incorrectly
– When copying formulas, fix column letters with `
How to Yieldmat Function in Excel
Why This Task Matters in Excel
Bond pricing and yield analysis sit at the heart of corporate treasury, portfolio management, and fixed-income research. One of the most common instruments you will encounter is a discount security or zero-coupon note that accrues interest but pays everything back—principal plus interest—on the maturity date. Unlike a plain-vanilla coupon bond, these instruments have no interim cash flows, making their valuation and yield calculations slightly different.
Knowing how to compute the annual yield of such a security helps you answer vital questions:
- Investor perspective
- “If I buy this Treasury bill for 97 cents on the dollar and hold it until maturity, what is my effective annual return?”
- “How does that return compare with alternative investments like money-market funds or comparable corporate notes?”
- Issuer perspective
- “At what discount rate do we need to issue a 270-day commercial paper note to hit our target cost of capital?”
- “How will that cost change if the settlement date is pushed out by a week?”
- Audit and compliance
- Regulators and auditors often ask for documented yield calculations. An incorrect figure could misstate interest expense, impair asset-liability management models, or trigger covenant breaches.
- Risk management
- Duration, value at risk, and scenario stress testing rely on the yield as a core building block. A mis-calculated yield will contaminate every downstream metric in the risk stack.
Excel shines in this domain because it is ubiquitous, transparent, and flexible. A well-structured workbook can instantly recompute yields across hundreds of instruments when settlement dates or market prices update. If you try to approximate the yield manually or with an ad-hoc method, you risk using inconsistent day-count conventions, overlooking odd first periods, or simply making arithmetic slips. Mastering YIELDMAT connects to other Excel skills (DATE functions, day-count analytics, data validation, scenario tables) and removes a critical bottleneck in fixed-income workflows.
Best Excel Approach
Excel has a dedicated function—YIELDMAT—expressly designed to calculate the annual yield of a security that pays interest at maturity. It incorporates all required bond math in one tidy formula, handling settlement and maturity dates, issue price, redemption value, annual coupon, and day-count convention.
Why choose YIELDMAT over DIY calculations?
- Accuracy: Microsoft’s implementation follows industry day-count standards and compounding assumptions.
- Convenience: No need to build intermediate discount factors or compounding equations.
- Flexibility: Change any input cell and the yield updates automatically.
- Auditability: Anyone versed in Excel finance functions can peer-review the workbook.
Syntax:
CODE_BLOCK_0
Parameter guide:
- settlement – date you take ownership of the security
- maturity – date the security matures
- issue – original issue date
- rate – annual coupon rate stated on the security (expressed as decimal, 5 percent → 0.05)
- pr – purchase price per 100 face value
- basis – (optional) day-count basis code: 0 = US 30/360, 1 = Actual/Actual, 2 = Actual/360, 3 = Actual/365, 4 = European 30/360
Alternative when you have coupon bonds: YIELD, and for Treasury bills that quote on a bank discount basis: YIELDDISC. We will revisit these in the Alternative Methods section.
Parameters and Inputs
Getting the inputs right is crucial; a single typo can swing the yield by several percentage points.
-
Date inputs (settlement, maturity, issue)
– Must be valid Excel serial dates. UseDATE(year, month, day)or reference a cell formatted as Date.
– Settlement must be on or after the issue date and strictly before maturity.
– Excel stores dates as numbers; treat them carefully in CSV imports where dates may arrive as text. -
Rate (annual coupon)
– Even if the security pays interest only at maturity, it still has a stated rate. Example: a zero-coupon Treasury STRIP has rate 0. Enter 0.000 or leave the cell blank and reference 0 in the formula. -
Price (pr)
– Enter the clean price per 100 face value. A price of 97.50 means you pay 97.50 for every 100 of par.
– The price must be positive and should not include accrued interest because a “paid at maturity” bond accrues nothing until the final day. -
Basis (optional)
– Defaults to 0 (US 30/360) if omitted, but government bills often use Actual/360 or Actual/365. Confirm with your term sheet.
– In mixed portfolios, place basis codes in a dedicated column so you can filter and audit later.
Validation tips
- Add Data Validation rules that reject settlement dates outside the issue-to-maturity window.
- Use
ISNUMBERandISERRORwrappers to flag imported text dates. - Protect formula cells to prevent accidental overwrites.
Edge cases
- Leap-year spans can slightly shift yields under Actual/365 vs Actual/360.
- Securities with rate 0 can still deliver non-zero YIELDMAT results based purely on price discount.
Step-by-Step Examples
Example 1: Basic Scenario
Imagine you are buying a 1-year zero-coupon Treasury note.
Sample data in the worksheet
- Settlement: 2024-03-15 (cell B2)
- Maturity: 2025-03-15 (cell B3)
- Issue date: 2024-03-15 (cell B4)
- Stated rate: 0 (cell B5)
- Price: 97.50 (cell B6)
- Basis: 1 (Actual/Actual) (cell B7)
Step-by-step:
-
Enter dates with the
DATEfunction to guarantee serial numbers:
=DATE(2024,3,15)in B2, B3, and B4 respectively (adjust year in B3 to 2025). -
In B8, create the formula:
CODE_BLOCK_1
- Press Enter. Excel returns 0.025619 (roughly 2.56 percent).
Explanation
YIELDMAT first computes the amount payable at maturity: 100 plus any coupon (rate × face value), which here is just 100. It then calculates the annual yield that equates the purchase price 97.50 with the maturity payment, considering Actual/Actual day counts between settlement and maturity.
Common variations
- If the security had a 4 percent coupon but still paid only at maturity, set B5 to 0.04.
- Change the basis to 2 (Actual/360) and observe the yield increase slightly because the denominator (days in year) shrinks.
Troubleshooting
- A
#NUM!error usually means settlement ≥ maturity or an invalid basis code. - A
#VALUE!error often indicates a date entered as text; apply Date format or wrap withDATEVALUE.
Example 2: Real-World Application
Scenario: Your firm’s cash desk wants to invest excess liquidity in discounted commercial paper (CP). The CP has a 270-day maturity.
Business context
- Treasury group buys CP at settlement date 2024-04-01.
- Issue date was 2024-03-25.
- Maturity date is 2024-12-20.
- Stated rate is 3.75 percent (interest accrues but is only paid at maturity).
- Market price quoted: 98.20.
- Basis: Actual/360 (code 2) is standard for CP.
Worksheet setup
Column A lists the field names, Column B holds the inputs.
After entering the data, place the formula in B8:
CODE_BLOCK_2
The result is 0.049968 or roughly 4.997 percent.
Business impact
The CP’s effective annual yield (nearly 5 percent) beats the firm’s revolving credit facility rate of 4.4 percent, making it an attractive short-term investment.
Integration with other Excel features
- Use Conditional Formatting to flag yields above a target hurdle rate.
- Build a table of multiple CP issues. Convert the range to an official Excel Table and copy the formula down automatically.
- Add a PivotTable to group instruments by counterparty and average the yields.
Performance considerations
For 5,000 CP lines, YIELDMAT recalculations remain instant on modern hardware. However, inserting volatile functions like TODAY() in settlement or maturity columns can trigger full recalcs; instead store settlement date in a fixed cell and update daily through VBA or Power Query.
Example 3: Advanced Technique
Goal: Stress-test a portfolio of structured notes with odd-first periods and mixed day-count conventions.
Data layout
- Table
tblNoteswith columns: Settlement, Maturity, Issue, StatedRate, Price, Basis. - 1,000 rows covering securities across USD, EUR, and JPY, each with varying issue dates and day-count bases.
Advanced steps
- Create a helper column
Yieldwith the structured reference:
CODE_BLOCK_3
- Add another column
StressedPricewhere you subtract 1.5 points to model a market shock.
CODE_BLOCK_4
- Calculate stressed yield:
CODE_BLOCK_5
- Compute the yield change in basis points:
CODE_BLOCK_6
- Use the Data Model and Power Pivot to aggregate average basis-point shifts by currency and issuer rating.
Performance optimization
- Disable automatic calculation, switch to Manual, and press F9 once the inputs are ready.
- Use
Numberformats, notGeneral, to prevent implicit conversions. - If workbook size balloons, offload historical scenarios to Power Query and retain only the live scenario in the sheet.
Error handling
Wrap YIELDMAT inside IFERROR to default to blank or “Input Error” when any field is missing:
CODE_BLOCK_7
Professional tips
- Store basis codes in a small lookup table with descriptive text so analysts can filter “Actual/365” instruments quickly.
- Lock the Issue, Settlement, and Maturity columns to preserve date integrity; allow editing only in Price cells for scenario analysis.
Tips and Best Practices
- Keep dates in ISO format (yyyy-mm-dd) to avoid regional confusion and apply a strict date format in the column.
- Separate assumptions (basis, rate) into dedicated columns; avoid hard-coding them in the formula so you can audit later.
- Use Excel Tables; they automatically copy YIELDMAT formulas and expand as you add rows, reducing manual drag errors.
- For dynamic settlement dates, reference a single cell (e.g., B1 for “As of date”) rather than embedding
TODAY(), controlling recalculation explicitly. - Combine YIELDMAT with
ROUNDto four decimal places for presentation, but store the raw value for calculations to avoid cumulative rounding bias. - Document the source of each input (term sheet, Bloomberg ticker) in a hidden note or adjacent column; future reviewers will thank you.
Common Mistakes to Avoid
- Mixing up price and rate
– Users sometimes enter 0.9820 instead of 98.20. Catch this by adding Data Validation that demands price greater than 20. - Using text dates
– A pasted “2024/03/15” string will break the formula. Confirm withISTEXTor convert withDATEVALUE. - Ignoring the basis parameter
– Default basis 0 may not match the instrument. Always check the term sheet; using the wrong basis can mis-state yield by several basis points. - Settlement equals maturity
– Even a 1-day overlap triggers#NUM!. Build a rule:=IF(B2>=B3,"Invalid dates","")to flag the problem immediately. - Accidentally locking references incorrectly
– When copying formulas, fix column letters with only when necessary; otherwise each row may point to a single price cell and all yields become identical.
Alternative Methods
| Method | Use Case | Pros | Cons |
|---|---|---|---|
| YIELDMAT | Interest-at-maturity securities | One function, industry-standard | Limited to single cash flow at maturity |
| YIELDDISC | Treasury bills quoted on bank discount yield | Mirrors market quoting | Not suitable for securities quoted in price terms |
| YIELD | Regular coupon bonds | Handles periodic coupons and odd periods | Requires coupon frequency input |
Manual IRR (RATE) | Exotic structures, non-standard cash flows | Full flexibility | More setup needed, can converge slowly |
When to switch
- Use
YIELDif the security pays semi-annual or quarterly coupons. - Use
YIELDDISCif you receive discount quotes rather than prices (e.g., 4.1 percent discount yield). Convert quotes to price or use the function directly. - For very complex structures with call options or step-up coupons, lay out explicit cash flows and solve with
IRRorXIRR.
Performance
YIELDMAT and YIELD execute nearly instantly even on thousands of rows because they involve direct algebraic solutions, not iterative guess-and-check like RATE. If you step into IRR territory, expect longer recalc times.
Migration strategies
You can migrate from YIELDDISC outputs to YIELDMAT by first converting the discount yield into price using PRICEDISC, then feeding that price into YIELDMAT, ensuring a consistent day-count basis across functions.
FAQ
When should I use this approach?
Use YIELDMAT whenever you are valuing a security that accumulates interest but pays everything—principal plus accrued interest—exactly on the maturity date. Typical examples include Treasury bills sold at a price discount, commercial paper, bank certificates of deposit, and zero-coupon corporate notes.
Can this work across multiple sheets?
Yes. Store your portfolio inputs in one sheet, then calculate yields in another sheet or dashboard by referencing the input sheet’s cells. Absolute or structured references avoid accidental misalignment.
What are the limitations?
YIELDMAT assumes a single payment at maturity and constant coupon accrual. It cannot model early redemptions, call features, or step-rate coupons. If those features exist, switch to a cash-flow modeling approach with XIRR.
How do I handle errors?
Wrap the function inside IFERROR or IF(ISNUMBER()). Create conditional formatting to turn cells red when #NUM! appears. Implement input validation to stop users from entering negative prices or backwards dates before the formula even runs.
Does this work in older Excel versions?
YIELDMAT has been available since Excel 2000 for Windows and Excel 2004 for Mac. All current Office 365, Excel 2019, and Excel 2016 releases fully support it. In Google Sheets, there is no direct equivalent; you would replicate the formula using algebra or RATE.
What about performance with large datasets?
Up to roughly 100,000 rows, YIELDMAT recalculations remain snap-fast on modern laptops. For bigger cubes, turn off automatic calculation, minimize volatile functions, and consider storing historical scenarios outside the main workbook.
Conclusion
Mastering YIELDMAT unlocks rapid, accurate yield calculations for a wide class of discount securities. Whether you are gauging the attractiveness of a Treasury bill, stress-testing a commercial paper book, or preparing audit documentation, this one function collapses pages of algebra into a single, transparent formula. By learning the inputs, guarding against common pitfalls, and adopting the best-practice tips outlined here, you will strengthen your fixed-income toolkit and free up time for deeper analysis. Next, explore related functions like YIELD and DURATION to round out your bond-math repertoire, and consider integrating Power Query for automated price feeds. Every minute you invest now pays dividends in faster, cleaner, and more defensible spreadsheets.
Related Articles
How to Yieldmat Function in Excel
Learn multiple Excel methods to calculate the yield of a security that pays interest at maturity (YIELDMAT) with step-by-step examples and practical applications.
How to Coupnum Function in Excel
Learn multiple Excel methods to determine the number of coupon payments between settlement and maturity dates with step-by-step examples and practical applications.
How to Future Value Vs Present Value in Excel
Learn multiple Excel methods to calculate future value vs present value with step-by-step examples, business-grade scenarios, and practical tips.