YIELD Function (LibreOffice Calc)
The YIELD function returns the annual yield of a coupon-paying security based on settlement date, maturity date, coupon rate, price, redemption value, coupon frequency, and day-count basis. It is essential for bond valuation and fixed-income analytics.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✔ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the YIELD Function Does ▾
- Computes yield to maturity (YTM)
- Uses coupon frequency (annual, semiannual, quarterly)
- Supports multiple day‑count basis systems
- Works with real dates, serial numbers, and DATEVALUE
- Fully compatible with Excel’s YIELD function
It is designed to be precise, finance‑grade, and essential for fixed‑income analytics.
Syntax ▾
YIELD(settlement; maturity; rate; price; redemption; frequency; [basis])
Arguments
-
settlement:
The date the security is traded to the buyer. -
maturity:
The date the security matures. -
rate:
Annual coupon rate (e.g., 0.05 for 5%). -
price:
Price per 100 face value (clean price). -
redemption:
Redemption value per 100 face value (usually 100). -
frequency:
Number of coupon payments per year:1= annual2= semiannual4= quarterly
-
basis (optional):
Day-count convention:
| basis | Day-count convention |
|---|---|
| 0 | US 30/360 |
| 1 | Actual/Actual |
| 2 | Actual/360 |
| 3 | Actual/365 |
| 4 | European 30/360 |
Basic Examples ▾
Yield of a semiannual coupon bond
=YIELD("2024-03-15"; "2029-03-15"; 0.05; 98.5; 100; 2)
Using Actual/Actual
=YIELD(A1; A2; 0.04; 101.2; 100; 2; 1)
Using text dates
=YIELD(DATEVALUE(A1); DATEVALUE(A2); Rate; Price; 100; 2)
Advanced Examples ▾
Quarterly coupon bond
=YIELD("2024-02-10"; "2027-02-10"; 0.06; 99.75; 100; 4)
From imported CSV timestamps
=YIELD(DATEVALUE(LEFT(A1;10)); DATEVALUE(LEFT(A2;10)); Rate; Price; Redemption; Freq)
From Excel serial dates stored as text
=YIELD(DATE(1899;12;30)+VALUE(A1); DATE(1899;12;30)+VALUE(A2); Rate; Price; Redemption; Freq)
Compute price from yield (inverse)
=PRICE(Settlement; Maturity; Rate; Yield; Redemption; Freq; Basis)
Compute yield spread vs benchmark
=YIELD(A1;A2;Rate;Price;100;2) - BenchmarkYield
Compute yield of a premium bond
=YIELD(A1;A2;0.07;105;100;2)
Compute yield of a discount bond
=YIELD(A1;A2;0.03;95;100;2)
Edge Cases and Behavior Details ▾
YIELD returns a numeric value (annual yield)
Accepts:
- Real dates
- Serial numbers
- DATEVALUE outputs
Invalid text → Err:502
Behavior details
- Settlement < Maturity must hold
- Frequency must be 1, 2, or 4
- Basis must be 0–4
- Uses clean price (excludes accrued interest)
- Coupon schedule is calculated backward from maturity
- Time components ignored
- Uses iterative numerical methods internally
YIELD of an error → error propagates
Common Errors and Fixes ▾
Err:502 — Invalid argument
Cause:
- Dates not recognized
- Frequency not 1, 2, or 4
- Basis outside 0–4
Fix:
- Wrap dates with DATEVALUE
- Validate frequency and basis
Err:504 — Invalid date sequence
Cause:
- Settlement after maturity
Fix:
- Correct date order
Yield seems incorrect
Cause:
- Wrong price (dirty vs clean)
- Wrong coupon rate
- Incorrect basis
- Incorrect redemption value
Fix:
- Verify inputs carefully
- Confirm day-count convention
- Ensure price is clean price
Best Practices ▾
- Use Actual/Actual (basis 1) for government bonds
- Use 30/360 for corporate bonds
- Normalize text dates with DATEVALUE
- Validate coupon frequency carefully
- Use YIELD with PRICE to build full valuation models
- Use COUP* functions to debug coupon schedules
Related Patterns and Alternatives ▾
- Use PRICE to compute price from yield
- Use ACCRINT to compute accrued interest
- Use COUPDAYS, COUPDAYSNC, COUPNUM, COUPPCD, COUPNCD for coupon schedule logic
- Use YEARFRAC for fractional year calculations
By mastering YIELD and its companion functions, you can build powerful, accurate, and fully professional fixed‑income valuation models in LibreOffice Calc.