This is the second and last page on the financial category of ECMA-376 5th edition Part 1 (December 2016) section 18.17.7. The category table lists 53 functions; the first page covers the 21 from ACCRINT to FVSCHEDULE and this page the other 32, from INTRATE (18.17.7.171) to YIELDMAT (18.17.7.355), in alphabetical order. For each function the page gives what it takes and returns, the standard’s example, what [MS-OI29500] v20260818 says Office does differently where it has a note, and what LibreOffice returns. Section numbers are the standard’s own.
How the examples were checked
The standard’s examples and edge cases were written as 197 formulas in
samples/xlsx/oracle/finfn2/formulas.txt, built into a real XLSX with
samples/xlsx/oracle/make-xlsx.mjs (formula cells without cached values) and converted to CSV by
LibreOffice (soffice --headless --convert-to csv). LibreOffice is an implementation, not the
standard: where it differs the difference is reported, not corrected. Its errors appear in its own
spellings: Err:502 (invalid argument, the standard’s #NUM! in most cases),
Err:504 (error in the parameter list) and Err:523 (the iteration did not
converge). The standard prints most results rounded; LibreOffice’s are its full precision. Dates are
serial numbers; XIRR and XNPV were fed the dates 1 January 2008, 1 March 2008, 30 October 2008, 15 February
2009 and 1 April 2009 from cells, as the standard’s example describes.
Day counts. Every security function with a basis argument (INTRATE, MDURATION, the ODD functions, PRICE, PRICEDISC, PRICEMAT, RECEIVED, YIELD, YIELDDISC, YIELDMAT) uses the five bases of the first page: 0 or omitted 30/360 US, 1 actual/actual, 2 actual/360, 3 actual/365, 4 European 30/360, and a basis below 0 or above 4 gives #NUM!. [MS-OI29500] gives the exact day adjustments in the note of each of them. In these tests LibreOffice returned Err:502 for basis 5 in INTRATE, PRICE, PRICEDISC, PRICEMAT, RECEIVED, YIELDDISC and ODDFPRICE.
The 32 functions
Argument names are the standard’s. Optional arguments are in brackets. Dates in the examples are written with DATE(year, month, day). Where a function has no [MS-OI29500] note the row says so.
| Function | Arguments and result | Standard’s example | LibreOffice |
|---|---|---|---|
INTRATE (.171) | settlement, maturity, investment, redemption [, basis]: the interest rate of a fully invested security, (redemption − investment)/investment × B/DIM. #NUM! if a date is out of range, settlement ≥ maturity, investment or redemption ≤ 0, or basis is out of 0 to 4. MS-OI29500 2.1.977: the basis table with the exact adjustments; the standard calls redemption “the security’s annual yield” in one place, Office defines it as the amount received at maturity | INTRATE(DATE(2008,2,15),DATE(2008,5,15),1000000,1014420,2) = 5.7680% | 0.0576800000000004; basis omitted and 0 give 0.0583280898876409, 1 gives 0.0586413333333337; basis 5, settlement after maturity, investment 0 and redemption 0 Err:502 |
IPMT (.172) | rate, per, nper, pv [, [fv] [, type]]: the interest part of the payment of period per; fv is 0 if omitted; type 0 pays at the end and 1 at the beginning; cash paid is negative. #NUM! for a type other than 0 or 1. MS-OI29500 2.1.978: Office does not truncate type, treats any non-zero type as 1, uses 0 when it is omitted, and returns #NUM! when per is not in 1 ≤ per < nper + 1 | IPMT(0.1/12,1*3,3,8000) = −22.41; IPMT(0.1,3,3,8000) = −292.45 | −22.4068930159241 and −292.447129909365; type 1 −265.861027190332, type 2 the same (any non-zero is 1, not #NUM!); per 0, per 3.5 and per 4 with nper 3 Err:502; period 1 with type 1 gives 0; rate 0 gives 0 |
IRR (.173) | values [, guess]: the internal rate of return of cash flows at regular intervals; text, logical values and empty cells in values are ignored; guess is 0.1 if omitted. The values need at least one positive and one negative number; #NUM! if no result can be computed. MS-OI29500 2.1.979: Office need not iterate | IRR({-70000,12000,15000,18000,21000}) = −2.1245%; with 26000 added 8.6631%; IRR({-70000,12000,15000},-0.1) = −44.3507% | −2.1244848273411%, 8.66309480365316% and −44.3506941334741%; a range holding the same numbers −2.1245%; guess 0 the same result; a range with a text cell and an empty cell (−70000, “x”, 12000, empty, 15000, 18000) gives −18.2137464145527%, so the text and the empty cell are skipped; values with no negative number or no positive number Err:523 |
ISPMT (.184) | rate, per, nper, pv: the interest paid during period per of an investment with equal principal payments. The standard says per shall be in 1 to nper. MS-OI29500 2.1.980: Office has no range restriction on per and returns #DIV/0! when nper is 0 | ISPMT(0.1/12,1,3*12,8000000) = −64814.81; ISPMT(0.1,1,3,8000000) = −533333.33 | −64814.8148148148 and −533333.333333333; per 4 with nper 3 gives 266666.666666667 (no range check, as the note says); nper 0 gives #NUM!, where the note says #DIV/0! |
MDURATION (.208) | settlement, maturity, coupon, yld, frequency [, basis]: the modified Macaulay duration, DURATION / (1 + yld/frequency), for par 100; frequency is truncated. #NUM! if a date is out of range, settlement ≥ maturity, coupon or yld < 0, frequency is not 1, 2 or 4, or basis is out of 0 to 4. MS-OI29500 2.1.991: the basis table, and the names the formula variables stand for | MDURATION(DATE(2008,1,1),DATE(2016,1,1),0.08,0.09,2,1) = 5.7357 | 5.73392357705927 with basis 1, not the standard’s digits; basis omitted gives 5.73566981391884, which matches 5.7357 (the same pattern as DURATION on the first page); frequency 2.9 gives 5.73392357705927 (truncated to 2); frequency 3, coupon −0.08 and settlement after maturity Err:502 |
MIRR (.216) | values, finance-rate, reinvest-rate: the modified internal rate of return, (−NPV(reinvest-rate, positive values) × (1 + reinvest-rate)n / (NPV(finance-rate, negative values) × (1 + finance-rate)))1/(n−1) − 1. Text, logical values and empty cells are ignored. #DIV/0! if values has no positive and no negative value. No MS-OI29500 note | MIRR({-120000,39000,30000,21000,37000,46000},0.1,0.12) = 12.6094%; with four values −4.8045%; with 0.14 as reinvest-rate 13.4759% | 12.6094130365905%, −4.80446552499808% and 13.4759110828315%; a range gives 12.6094130365905%; values with no negative number Err:502, where the standard says #DIV/0! |
NOMINAL (.228) | effect-rate, npery: the nominal annual rate, npery × ((1 + effect-rate)1/npery − 1); npery is truncated. #NUM! if effect-rate ≤ 0 or npery < 1. No MS-OI29500 note | NOMINAL(0.053543,4) = 5.2500% | 5.2500319868356%; npery 4.9 the same (truncated); effect-rate 0 and npery 0 Err:502 |
NPER (.235) | rate, pmt, pv [, [fv] [, type]]: the number of periods of an investment with constant payments and rate; fv is 0 if omitted. #NUM! for a type other than 0 or 1. MS-OI29500 2.1.1004: Office treats any non-zero type as 1, uses 0 when it is omitted and does not truncate it | NPER(0.12/12,-100,-1000,10000,1) = 59.67; NPER(0.12/12,-100,-1000) = −9.58 | 59.6738656742946 and −9.57859403981317; type 2 and type 0.5 give 59.6738656742946 (non-zero is 1); rate 0 gives 90; NPER(0.01,-100,1000) 10.5886444594232; pmt 0 gives #NUM! |
NPV (.236) | rate, argument-list: the net present value of cash flows at the ends of equal periods, the sum of valuei/(1 + rate)i; a first flow at the start of the first period is added outside. Numbers, empty cells, logical values and numeric text among the arguments are included; error values and other text are ignored; in an array or reference only numbers count. MS-OI29500 2.1.1005: Office includes numbers and text that converts to numbers, and ignores empty cells, logical values and text that does not convert | NPV(0.1,-10000,3000,4200,6800) = 1188.44 | 1188.44341233522; the same numbers as an inline array 1188.44341233522. A range holding −10000, text “x”, TRUE, an empty cell, 3000, 4200 and 6800 gives 254.783267412184: the text and the empty cell are skipped but TRUE counts as 1, so the standard’s “logical values in a reference are ignored” does not hold. Direct arguments: TRUE gives −1290.06898435899 (counted as 1); an empty argument −1290.89543063999 (counted as a zero cash flow, so the later flows move one period); a text argument, “3000” or “x”, Err:504 |
ODDFPRICE (.241) | settlement, maturity, issue, first-coupon, rate, yld, redemption, frequency [, basis]: the price per 100 of a security with an odd (short or long) first period. #NUM! if a date is out of range, maturity > first-coupon > settlement > issue does not hold, rate or yld < 0, redemption ≤ 0, frequency is not 1, 2 or 4, or basis is out of 0 to 4. MS-OI29500 2.1.1008: the basis table; Office does not require the function to be specific to US currency; #NUM! when redemption ≤ 0 | ODDFPRICE(DATE(2008,11,11),DATE(2021,3,1),DATE(2008,10,15),DATE(2009,3,1),0.0785,0.0625,100,2,1) = 113.5977 | #VALUE!, not 113.5977, and the same with basis omitted and with redemption 0; basis 5, frequency 3, a negative rate, first-coupon before settlement and issue after settlement Err:502. LibreOffice does not return the standard’s example |
ODDFYIELD (.242) | settlement, maturity, issue, first-coupon, rate, pr, redemption, frequency [, basis]: the yield of a security with an odd first period. #NUM! under the same date, frequency and basis rules, and if rate or pr < 0. MS-OI29500 2.1.1009: the basis table; #NUM! if rate < 0 or pr ≤ 0 | ODDFYIELD(DATE(2008,11,11),DATE(2021,3,1),DATE(2008,10,15),DATE(2009,3,1),0.0575,84.5,100,2,0) = 7.7246% | #VALUE! for the example and with basis omitted; pr 0 and frequency 3 Err:502 |
ODDLPRICE (.243) | settlement, maturity, last-interest, rate, yld, redemption, frequency [, basis]: the price per 100 of a security with an odd last coupon period. #NUM! if a date is out of range, maturity > settlement > last-interest does not hold, rate or yld < 0, redemption ≤ 0, frequency or basis is out of range. MS-OI29500 2.1.1010: the basis table; #NUM! when redemption ≤ 0 | ODDLPRICE(DATE(2008,11,11),DATE(2021,3,1),DATE(2008,10,15),0.0785,0.0625,100,2,1) = 99.8783 | 110.875429505795 with basis 1 and 110.882869098244 with basis omitted, not 99.8783; redemption 0 and last-interest after settlement Err:502. The standard’s example is not reproduced |
ODDLYIELD (.244) | settlement, maturity, last-interest, rate, pr, redemption, frequency [, basis]: the yield of a security with an odd last period. #NUM! under the same rules, and if rate < 0 or pr ≤ 0. MS-OI29500 2.1.1011: the basis table; #NUM! if rate < 0 or pr ≤ 0 | ODDLYIELD(DATE(2008,11,11),DATE(2021,3,1),DATE(2008,10,15),0.0575,84.5,100,2,0) = 4.5192% | 0.0825480863149533 (8.25%), not 4.5192%, with basis 0 and with basis omitted; pr 0 and a negative rate Err:502 |
PMT (.253) | rate, nper, pv [, [fv] [, type]]: the payment of a loan with constant payments and rate, principal and interest only; fv is 0 if omitted. #NUM! for a type other than 0 or 1. MS-OI29500 2.1.1016: #DIV/0! when nper is 0; Office treats any non-zero type as 1, does not truncate it and uses 0 when it is omitted | PMT(0.08/12,10,10000) = −1,037.03; PMT(0.08/12,10,10000,0,1) = −1,030.16 | −1037.03208935915 and −1030.16432717797; type 2 and 0.5 give −1030.16432717797; rate 0 gives −1000; fv 1000 gives −1134.0686316284; nper 0 gives #NUM!, where the note says #DIV/0! |
PPMT (.256) | rate, per, nper, pv [, [fv] [, type]]: the principal part of the payment of period per (1 to nper). #NUM! for a type other than 0 or 1. MS-OI29500 2.1.1019: Office does not truncate type, uses 0 when omitted, treats any non-zero as 1, and returns #NUM! when per is below 1 or above nper | PPMT(0.1/12,1,2*12,2000) = −75.62; PPMT(0.08,10,10,200000) = −27,598.05 | −75.6231860083664 and −27598.0534624214; type 1 and type 2 −25553.7532059457; per 0 and per 11 Err:502 |
PRICE (.257) | settlement, maturity, rate, yld, redemption, frequency [, basis]: the price per 100 of a security that pays periodic interest, the discounted redemption plus the discounted coupons less the accrued interest. #NUM! if a date is out of range, settlement ≥ maturity, rate or yld < 0, redemption ≤ 0, frequency is not 1, 2 or 4, or basis is out of 0 to 4. MS-OI29500 2.1.1020: the basis table and that the function is not specific to US currency | PRICE(DATE(2008,2,15),DATE(2017,11,15),0.0575,0.065,100,2,0) = 94.6344 | 94.6343616213221; basis omitted the same; basis 1 gives 94.6354492078772; frequency 3, basis 5, a negative rate, redemption 0 and settlement after maturity Err:502 |
PRICEDISC (.258) | settlement, maturity, discount, redemption [, basis]: the price per 100 of a discounted security, redemption − discount × redemption × DSM/B. #NUM! if a date is out of range, settlement ≥ maturity, discount or redemption ≤ 0, or basis is out of 0 to 4. MS-OI29500 2.1.1021: the basis table | PRICEDISC(DATE(2008,2,16),DATE(2008,3,1),0.0525,100,2) = 99.7958 | 99.7958333333333; basis omitted the same; discount 0, redemption 0, settlement after maturity and basis 5 Err:502 |
PRICEMAT (.259) | settlement, maturity, issue, rate, yld [, basis]: the price per 100 of a security that pays interest at maturity. #NUM! if a date is out of range, settlement ≥ maturity, rate or yld < 0, or basis is out of 0 to 4. MS-OI29500 2.1.1022: the basis table and that the function is not specific to US currency | PRICEMAT(DATE(2008,2,15),DATE(2008,4,13),DATE(2007,11,11),0.061,0.061,0) = 99.9845 | 99.984498875557; basis omitted the same; basis 1 gives 99.9802978513638; a negative rate Err:502; an issue date after settlement (11 March 2008) is accepted and gives 99.1231764339476, the standard has no rule for it |
PV (.263) | rate, nper, pmt [, [fv] [, type]]: the present value of an investment; either pmt or fv shall be given. #NUM! for a type other than 0 or 1. MS-OI29500 2.1.1025: Office uses 0 when type is omitted, does not truncate it and allows any non-zero value | PV(0.08/12,12*20,500,,0) = −59,777.15 | −59777.1458511878, also with type omitted; type 1 and 2 give −60175.6601568624; rate 0 gives −120000; PV(0.08/12,240,,1000) gives −202.97138865083 |
RATE (.270) | nper, pmt, pv [, [fv] [, [type] [, guess]]]: the interest rate per period by iteration; guess is 10 percent if omitted. #NUM! for a type other than 0 or 1 or if it has not converged after an implementation-defined number of iterations. MS-OI29500 2.1.1027: type defaults to 0 and any non-zero value means the beginning of the period; Office does not iterate | RATE(4*12,-200,8000) = 0.7701%; times 12 = 9.2418% | 0.770147248823326% and 0.0924176698587991 for the product; type 1 and type 2 0.805298192393902%; guess 0.05 gives 0.770147248820193% (the last digits move with the guess); nper 0 Err:502; RATE(48,200,8000) (no solution) Err:523 |
RECEIVED (.271) | settlement, maturity, investment, discount [, basis]: the amount received at maturity of a fully invested security, investment / (1 − discount × DIM/B). #NUM! if a date is out of range, settlement ≥ maturity, investment or discount ≤ 0, or basis is out of 0 to 4. MS-OI29500 2.1.1028: the basis table | RECEIVED(DATE(2008,2,15),DATE(2008,5,15),1000000,0.0575,2) = 1014584.65 | 1014584.6544071 with basis 2; basis omitted gives 1014420.26586264; investment 0, discount 0, settlement after maturity and basis 5 Err:502 |
SLN (.293) | cost, salvage, life: the straight-line depreciation of one period, (cost − salvage)/life. No #NUM! list. No MS-OI29500 note | SLN(30000,7500,10) = 2,250.00 | 2250; life 0 gives #DIV/0!; salvage above cost gives −1000; life 2.5 gives 9000 |
SYD (.314) | cost, salvage, life, per: the sum-of-years’ digits depreciation of period per, (cost − salvage) × (life − per + 1) × 2 / (life × (life + 1)); per has the units of life. No #NUM! list. No MS-OI29500 note | SYD(30000,7500,10,1) = 4,090.91; SYD(30000,7500,10,10) = 409.09 | 4090.90909090909 and 409.090909090909; per 11 gives 0; per 0 gives 4500; per 1.5 gives 3886.36363636364; life 0 gives #NUM! |
TBILLEQ (.318) | settlement, maturity, discount: the bond-equivalent yield of a US Treasury bill. #NUM! if a date is out of range, settlement > maturity, maturity is more than one year after settlement, or discount ≤ 0. No MS-OI29500 note | TBILLEQ(DATE(2008,3,31),DATE(2008,6,1),0.0914) = 9.4151% | 0.094151493565943; settlement after maturity, maturity 1 April 2009, maturity exactly one year later (31 March 2009) and discount 0 Err:502 (so an exact year is refused, where the standard says “more than” one year); equal dates give 0.0926929781616777, not an error |
TBILLPRICE (.319) | settlement, maturity, discount: the price per 100 of a Treasury bill, 100 × (1 − discount × DSM/360). #NUM! if a date is out of range, settlement ≥ maturity, maturity is more than a year after settlement, or discount ≤ 0. MS-OI29500 2.1.1052: Office is not specific to any currency or Treasury bill, and returns #NUM! when settlement ≥ maturity (the standard’s earlier sentence says >) | TBILLPRICE(DATE(2008,3,31),DATE(2008,6,1),0.09) = 98.4500 | 98.45; discount 0 Err:502; equal dates give 99.975 and maturity 1 April 2009 gives 90.95, where the standard says #NUM! for both |
TBILLYIELD (.320) | settlement, maturity, pr: the yield of a Treasury bill, (100 − pr)/pr × 360/DSM. #NUM! if a date is out of range, settlement ≥ maturity, maturity is more than a year after settlement, or pr ≤ 0. MS-OI29500 2.1.1053: pr is not specific to any currency; #NUM! when settlement ≥ maturity | TBILLYIELD(DATE(2008,3,31),DATE(2008,6,1),98.45) = 9.1417% | 0.0914169629253423; equal dates, maturity 1 April 2009 and pr 0 Err:502 |
VDB (.342) | cost, salvage, life, start-period, end-period [, [factor] [, no-switch-flag]]: the depreciation between two periods, partial periods allowed, by the declining balance with factor (2 if omitted); with no-switch-flag FALSE or omitted it switches to straight line when that is larger. #NUM! if a numeric argument is not positive, start-period > end-period or end-period > life; 0 if cost is above salvage. MS-OI29500 2.1.1066: the two #NUM! rules are Office’s; and 0 is returned when cost is less than salvage | VDB(2400,300,10*365,0,1) = 1.32; VDB(2400,300,10*12,0,1) = 40.00; VDB(2400,300,10*12,6,18) = 396.31 | 1.31506849315065, 40 and 396.306053264752; VDB(2400,300,10,0,10) 2100 with the flag omitted, TRUE or FALSE; factor 1.5 for the first period 360; start 0.5 end 1.5 gives 432; start 0 end 0 gives 0; start after end, end after life and factor 0 Err:502; cost 300 with salvage 2400 gives Err:502, where the note says 0 |
XIRR (.349) | values, dates [, guess]: the internal rate of return of a schedule that need not be periodic; payments are discounted on a 365-day year from the first date; the first date is the earliest and the others may come in any order; guess is 0.1 if omitted. #NUM! if a date is out of range, values has no positive and no negative number, a date precedes the first, values and dates differ in length, or it has not converged. MS-OI29500 2.1.1070: Office need not iterate, returns #VALUE! for a date out of range, and lets dates precede the start date | XIRR({-10000,2750,4250,3250,2750},F2397:J2397,0.1) = 37.34%, with the dates in F2397:J2397 as above | 0.373362533518832 (37.34%), also with guess omitted and with guess −0.5; values of different length than dates and values with no negative number Err:502. A reversed date range such as E2:A2 is normalised by LibreOffice to A2:E2, so it tests nothing |
XNPV (.350) | rate, values, dates: the net present value of a schedule that is not periodic, the sum of Pi/(1 + rate)(di − d1)/365. #NUM! if rate ≤ 0, a date is out of range or precedes the first, or values and dates differ in length. MS-OI29500 2.1.1071: Office returns #NUM! if rate ≤ 0, which the standard does not state as a restriction | XNPV(0.09,{-10000,2750,4250,3250,2750},F2397:J2397) = 2086.65 | 2086.64760203154; rate 0 gives 3000 and rate −0.1 gives 4232.76720866136, where the standard and the note say #NUM!; values of different length than dates Err:502 |
YIELD (.353) | settlement, maturity, rate, pr, redemption, frequency [, basis]: the yield of a security that pays periodic interest; with one coupon period or less to redemption a closed formula, otherwise iterated. #NUM! if a date is out of range, settlement ≥ maturity, rate < 0, pr or redemption ≤ 0, frequency is not 1, 2 or 4, or basis is out of 0 to 4. MS-OI29500 2.1.1073: the basis table; redemption and pr are per 100 currency units; rate is the annual coupon rate | YIELD(DATE(2008,2,15),DATE(2016,11,15),0.0575,95.04287,100,2,0) = 6.5000% | 0.0650000068807552; basis omitted the same; basis 1 gives 0.0650018206055472; maturity 15 November 2008 (one period) gives 0.128612839291235; frequency 3, a negative rate, pr 0 and redemption 0 Err:502 |
YIELDDISC (.354) | settlement, maturity, pr, redemption [, basis]: the annual yield of a discounted security. #NUM! if a date is out of range, settlement ≥ maturity, pr or redemption ≤ 0, or basis is out of 0 to 4. MS-OI29500 2.1.1074: the basis table; pr and redemption are per 100 currency units | YIELDDISC(DATE(2008,2,16),DATE(2008,3,1),99.795,100,2) = 5.2823% | 0.0528225719868601 with basis 2; basis omitted gives 0.0493010671877361; pr 0, redemption 0, settlement after maturity and basis 5 Err:502 |
YIELDMAT (.355) | settlement, maturity, issue, rate, pr [, basis]: the annual yield of a security that pays interest at maturity. #NUM! if a date is out of range, issue ≥ settlement, settlement ≥ maturity, rate < 0, pr ≤ 0, or basis is out of 0 to 4. MS-OI29500 2.1.1075: the basis table; pr is per 100 currency units; #NUM! if pr ≤ 0, rate < 0 or issue ≥ settlement | YIELDMAT(DATE(2008,3,15),DATE(2008,11,3),DATE(2007,11,8),0.0625,100.0123,0) = 6.0954% | 0.0609543336915386, also with basis omitted; basis 1 gives 0.0609666856464937; a negative rate and pr 0 Err:502; issue equal to settlement is accepted and gives 0.0622981268040876, where the standard and the note say #NUM! |
Divergence from the standard
- Error values. Where the standard says #NUM! LibreOffice returns
Err:502; where it says #DIV/0! (MIRR without both signs, and per the notes PMT and ISPMT with nper 0) it returns Err:502 or #NUM!; an IRR or RATE that does not converge gives Err:523. A file stores the error of the program that saved it. - The standard’s own examples that LibreOffice does not reproduce. ODDFPRICE and ODDFYIELD return #VALUE! for the printed examples; ODDLPRICE gives 110.875 where the standard prints 99.8783, and ODDLYIELD gives 8.25% where it prints 4.5192%. MDURATION prints 5.7357, which is what LibreOffice returns with the basis omitted, not with basis 1 as the example is written. A second implementation was read: Gnumeric’s
plugins/fn-financial/functions.c(calc_oddfprice, calc_oddlprice, calc_oddlyield, date_ratio; saved as research/xlsx/gnumeric-fn-financial-functions.c, lines 2479 to 2823). Transcribed in scripts/xlsx/odd-second-impl.mjs it gives ODDFPRICE 113.5977 (basis 1) and ODDFYIELD 7.72455% (basis 0), which are the standard’s printed values, so the standard is right there and LibreOffice’s #VALUE! is its failure. For ODDLPRICE it gives 110.8745 (basis 1; LibreOffice 110.8754) and 110.8829 (basis 0, exactly LibreOffice’s basis-omitted result), and for ODDLYIELD 8.254808631% (basis 0, equal to LibreOffice to 15 digits); neither program reproduces the printed 99.8783 and 4.5192%, so those two printed values are not confirmed by any program read. The 0.0009 difference in ODDLPRICE with basis 1 between Gnumeric and LibreOffice was not traced. - Where the standard says #NUM! LibreOffice returns a value. XNPV with a rate of 0 or below, YIELDMAT with issue equal to settlement, TBILLPRICE with equal dates or maturity over a year away, TBILLEQ with equal dates.
- Where LibreOffice returns an error and Office a value. VDB with cost below salvage (Err:502, the note says 0).
- Payment type. The standard says a type other than 0 or 1 is #NUM! and that it is truncated; Office does not truncate, treats any non-zero value as 1 and uses 0 when it is omitted, and LibreOffice does the same for IPMT, NPER, PMT, PPMT, PV and RATE, as the notes say.
- NPV and IRR with mixed cells. LibreOffice skips text and empty cells in a range, counts TRUE as 1 in an NPV range, and rejects a text argument given directly (Err:504). An omitted NPV argument counts as a zero cash flow in its period.
- TBILL functions. A maturity exactly one year after settlement is refused by TBILLEQ although the standard only excludes “more than” one year.
- Standard text slips. RECEIVED’s formula explains DIM as the days from issue to maturity although it has no issue; INTRATE and some others describe the security with different wording of the basis tables; the ODDLYIELD formula calls the price “par” where the argument is “pr”; the typeset formulas are scattered over lines in the text copy.
What the viewer does
The viewer shows the value a cell stores and never recalculates a worksheet. The conditional-format
calculator (explorer/formats/xlsx/cf.js) implements none of the 32 functions on this page; a rule
that uses one is reported as not calculated, not guessed.
See also
- Functions: financial (ACCRINT to FVSCHEDULE): the first financial page, with the day-count bases
- Formulas: references, ranges, array formulas, error values
- Functions: date and time: DATE, the serial numbers behind the dates here
Not described on this page
- Excel’s own results: Excel was not run, so the right-hand column is LibreOffice. The [MS-OI29500] notes 2.1.977 to 2.1.1075 that name these functions were read (27 of the 32; MIRR, NOMINAL, SLN, SYD and TBILLEQ have none).
- The basis adjustments of the notes were not tested date by date; the odd-period functions were run with the standard’s example and a few bases only, so the long-first-period (odd-long, where Gnumeric changes the period count and the day ratios) and short-first-period cases of ODDFPRICE and ODDFYIELD were not told apart; the second implementation was run only for bases 0 and 1 and the short-first case of the example.
- The unordered-dates cases of XIRR and XNPV (a date before the first date): a reversed range is normalised by LibreOffice, so the case was not exercised.
- The mathematical formulas of the standard (ODDLYIELD at part1.txt 86264 to 86288 and RECEIVED at 87420 to 87430 were re-read) are in the text copy as math-italic letters with the fraction and sum layout scattered over lines, so the exact expression cannot be rebuilt from the text; the descriptions above are from the prose, the examples and the second implementation. The ODDLYIELD formula sums over NC quasi-coupon periods and names its price “par” in the formula but “pr” in the argument table; the printed example 4.5192% was not reproduced by either program, and without the typeset formula it was not worked out why. The slip about RECEIVED is confirmed: its list says “DIM = number of days from issue to maturity” although the function has no issue argument. The slips named for MIRR and NPV were not re-read line by line this round.
Sources
- ECMA-376 5th edition Part 1, research/ooxml/ecma376/p1/part1.txt: category table (lines 76998 to 77015), INTRATE (83683), IPMT (83803), IRR (83838), ISPMT (84035), MDURATION (84752), MIRR (85080), NOMINAL (85450), NPER (85607), NPV (85641), ODDFPRICE (85800), ODDFYIELD (86021), ODDLPRICE (86140), ODDLYIELD (86261), PMT (86629), PPMT (86726), PRICE (86758), PRICEDISC (86906), PRICEMAT (87024), PV (87222), RATE (87382), RECEIVED (87418), SLN (88145), SYD (88842), TBILLEQ (88918), TBILLPRICE (88940), TBILLYIELD (88971), VDB (89538), XIRR (89922), XNPV (89973), YIELD (90172), YIELDDISC (90314), YIELDMAT (90423)
- [MS-OI29500] v20260818, research/ooxml/ms/MS-OI29500.txt, notes 2.1.977 (line 19129) to 2.1.1075 (line 20324)
- LibreOffice, soffice headless, XLSX to CSV: samples/xlsx/oracle/finfn2/