Function note

On basis 1 COUPDAYS walks back from maturity by its own rule, not COUPPCD to COUPNCD

FUNC.COUPDAYS · FUNC.COUPNCD · FUNC.COUPPCD

FN-COUPDAYS-001: On basis 1 COUPDAYS walks back from maturity by its own rule, not COUPPCD to COUPNCD

Quirk · measured · recorded 2026-11-04

On basis 1 (actual/actual) COUPDAYS does not always equal COUPNCD minus COUPPCD. Its rule: start at maturity and step back by 12/frequency months. Each step keeps the day of the month and clamps it to the length of the target month, and the clamped date is the start of the next step, so passing through February lowers the day for every earlier date. Stop at the last date still after settlement, call it next. The answer is the number of actual days from one period before next up to next, and this last step keeps month ends: if next is the last day of its month, the start is the last day of its month. On the other bases the answer is 360/frequency (bases 0, 2, 4) or 365/frequency (basis 3). With this rule, all 5,584 recorded rows match (4,072 distinct inputs): 5,568 numbers and 16 #NUM!, from Excel builds 20131 and 20430. Of the 967 basis 1 rows, 81 (49 distinct inputs) differ from the day count between the dates of a schedule anchored on maturity with month ends kept. For maturity 1998-06-30 with semi-annual coupons, COUPDAYS(35748,35976,2,1) is 183, from 1997-06-30 to 1997-12-30; the anchored schedule gives 184. In one recorded case all three functions were read on the same inputs: COUPNCD(44043,2958465,2,1) less COUPPCD is 44196 - 44012 = 184, and COUPDAYS is 183.

Call and input routeInputsExcelCorrect valueRecorded in
COUPDAYS(35748, 35976, 2, 1)
cell-value2
settlement: 35748
0x40e1748000000000
maturity: 35976
0x40e1910000000000
frequency: 2
0x4000000000000000
basis: 1
0x3ff0000000000000
183
0x4066e00000000000
—Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
COUPDAYS(36452, 36891, 4, 1)
cell-value2
settlement: 36452
0x40e1cc8000000000
maturity: 36891
0x40e2036000000000
frequency: 4
0x4010000000000000
basis: 1
0x3ff0000000000000
91
0x4056c00000000000
—Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
COUPDAYS(36812, 47907, 4, 1)
cell-value2
settlement: 36812
0x40e1f98000000000
maturity: 47907
0x40e7646000000000
frequency: 4
0x4010000000000000
basis: 1
0x3ff0000000000000
92
0x4057000000000000
—Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
COUPDAYS(37015, 38137, 4, 1)
cell-value2
settlement: 37015
0x40e212e000000000
maturity: 38137
0x40e29f2000000000
frequency: 4
0x4010000000000000
basis: 1
0x3ff0000000000000
89
0x4056400000000000
—Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
COUPDAYS(38044, 38411, 2, 1)
cell-value2
settlement: 38044
0x40e2938000000000
maturity: 38411
0x40e2c16000000000
frequency: 2
0x4000000000000000
basis: 1
0x3ff0000000000000
184
0x4067000000000000
—Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
COUPDAYS(34911, 35216, 2, 1)
cell-value2
settlement: 34911
0x40e10be000000000
maturity: 35216
0x40e1320000000000
frequency: 2
0x4000000000000000
basis: 1
0x3ff0000000000000
183
0x4066e00000000000
—Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
COUPPCD(44043, 2958465, 2, 1)
cell-value2
settlement: 44043
0x40e5816000000000
maturity: 2958465
0x4146924080000000
frequency: 2
0x4000000000000000
basis: 1
0x3ff0000000000000
44012
0x40e57d8000000000
—Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
COUPNCD(44043, 2958465, 2, 1)
cell-value2
settlement: 44043
0x40e5816000000000
maturity: 2958465
0x4146924080000000
frequency: 2
0x4000000000000000
basis: 1
0x3ff0000000000000
44196
0x40e5948000000000
—Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
COUPDAYS(44043, 2958465, 2, 1)
cell-value2
settlement: 44043
0x40e5816000000000
maturity: 2958465
0x4146924080000000
frequency: 2
0x4000000000000000
basis: 1
0x3ff0000000000000
183
0x4066e00000000000
—Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H

Basis: All 5,584 rows of three recorded sets: 3,012 and 1,512 rows from build 20430, 1,060 from build 20131. The rule was recomputed independently from the calendar and matched all 5,566 number rows with settlement at serial 61 or later, on every basis. The other two number rows have settlement 0 and basis 0, and read 180. In a study of 42 ways to walk and measure the schedule, this was the only one to match all 965 rows with basis exactly 1.

Inferred: The rule reproduces every recorded row; that Excel's code works this way is inferred. For basis 1 no settlement or maturity before serial 61, where Excel's calendar differs from the Gregorian one, is in the recorded rows.

Evidence and capture sources

Machine-readable note records