FN-COUPNUM-001: COUPNUM is #NUM! when the coupon before settlement falls before 1900
Quirk · measured · recorded 2026-11-04
If the coupon date before settlement, counted back from maturity, falls before 1 January 1900, COUPNUM gives #NUM!. The other coupon functions still answer for the same inputs: COUPPCD returns 0, COUPNCD the next coupon, and COUPDAYS, COUPDAYBS and COUPDAYSNC a day count. With maturity serial 400 (1901-02-03) and semi-annual coupons, the coupon dates are serials 34 and 216: settlement 33 gives #NUM!, settlement 34 gives 2. With maturity 367, settlement 0 gives #NUM! and settlement 1 gives 2. This covers settlement 0 too: COUPNUM(0,m,2,0) was #NUM! for every maturity read.
| Call and input route | Inputs | Excel | Correct value | Recorded in |
|---|---|---|---|---|
COUPNUM(33, 400, 2, 0)cell-value2 | settlement: 330x4040800000000000maturity: 4000x4079000000000000frequency: 20x4000000000000000basis: 00x0000000000000000 | #NUM! | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
COUPNUM(34, 400, 2, 0)cell-value2 | settlement: 340x4041000000000000maturity: 4000x4079000000000000frequency: 20x4000000000000000basis: 00x0000000000000000 | 20x4000000000000000 | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
COUPNUM(0, 367, 2, 0)cell-value2 | settlement: 00x0000000000000000maturity: 3670x4076f00000000000frequency: 20x4000000000000000basis: 00x0000000000000000 | #NUM! | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
=COUPNUM(0,182,2,0)formula-literal | As typed | #NUM! | — | Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA |
=COUPNUM(A1,400,2,0)cell-value2 | A1: 00x0000000000000000 | #NUM! | — | Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA |
=COUPPCD(A1,400,2,0)cell-value2 | A1: 00x0000000000000000 | 00x0000000000000000 | — | Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA |
=COUPNCD(A1,400,2,0)cell-value2 | A1: 00x0000000000000000 | 340x4041000000000000 | — | Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA |
Basis: The rule matches all 429 recorded COUPNUM readings (325 #NUM!, 104 counts) when recomputed independently from the calendar, and the 24 COUPNUM readings of the date-boundary sheets. COUPPCD, COUPNCD, COUPDAYS, COUPDAYBS and COUPDAYSNC companions come from the same sheets.
Evidence and capture sources
- DnaCalc · crates/calc-func/src/ported/coupon_family.rs 2033d9feb7d9f99817b4b2b34837509bf5af843c · coupnum_kernel the limit as implemented
- DnaCalc · apps/dna-onecalc/tests/acceptance.rs 2d0eddcac86413014643af81d646581d54ba57bc · delivered_fn4_coupon_counts_at_calendar_start recorded answers pinned
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPNUM.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · 429 recorded readings
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/functions-fn4-date-domain.capture.json 2d0eddcac86413014643af81d646581d54ba57bc · sheets qd153 to qd236 boundary sheets for all six coupon functions
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPNUM.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-COUPNUM-calendar-boundary-127
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPNUM.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-COUPNUM-calendar-boundary-128
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPNUM.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-COUPNUM-calendar-boundary-85
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/functions-fn4-date-domain.capture.json 2d0eddcac86413014643af81d646581d54ba57bc · sheet qd230, row 20, column 10
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/functions-fn4-date-domain.capture.json 2d0eddcac86413014643af81d646581d54ba57bc · sheet qd205, row 20, column 10
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/functions-fn4-date-domain.capture.json 2d0eddcac86413014643af81d646581d54ba57bc · sheet qd217, row 20, column 10
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/functions-fn4-date-domain.capture.json 2d0eddcac86413014643af81d646581d54ba57bc · sheet qd193, row 20, column 10