What it does
COUPDAYS(settlement, maturity, frequency, [basis])
COUPDAYS(settlement, maturity, frequency, [basis]) returns the number of days in the coupon
period that contains the settlement date.
It is the denominator of every accrual fraction in bond arithmetic. Accrued interest is
COUPDAYBS / COUPDAYS of a coupon; the discounting exponent in PRICE is
COUPDAYSNC / COUPDAYS. Get this function wrong and every price and yield built on it is wrong
by the same proportion.
The coupon period is determined by the schedule described on
COUPNCD: coupon dates run backwards from maturity in
steps of 12/frequency months, and settlement selects one period from that ladder. On basis 1
Excel's period comes from its own walk back from maturity (FN-COUPDAYS-001).
Arguments
COUPDAYS(settlement, maturity, frequency, [basis]) — the family's shared four arguments;
Microsoft's argument descriptions and the five-row basis table are quoted on
COUPNCD.
Unlike its five siblings, COUPDAYS genuinely depends on basis in the strongest possible way:
basis chooses between "measure the calendar" and "quote a convention". Omitting basis asks
for 30/360, and gets a flat 360/frequency for every period of every bond.
Microsoft documents that "All arguments are truncated to integers."
Quirks
Why the answer is often not a whole number of days
Here is the thing that surprises readers: COUPDAYS does not always count days. For four of
the five bases it returns a convention, and the convention need not be an integer.
So at frequency 2 the answers are 180, 180, 182.5 and 180 for bases 0, 2, 3 and 4 — and
182.5 is not a number of days that any calendar contains. Under basis 1 the answer really is a
day count, and it varies from period to period: semiannual periods are 181, 182, 183 or 184 days
long depending on which months they span and whether a leap day falls inside.
The logic is coherent once stated: a /360 or /365 basis declares a year length, and the
coupon period is by definition a 1/frequency share of that declared year. Only actual/actual
declines to declare one and measures the calendar instead. But the practical consequence is
worth stating plainly: basis 2 is "actual/360", and yet COUPDAYS under basis 2 ignores the
actual calendar entirely. The "actual" in the name governs the numerator, not the denominator.
The additivity that fails
The obvious identity is
COUPDAYBS + COUPDAYSNC = COUPDAYS
The reason follows directly from the table above and the corresponding one on
COUPDAYBS: under bases 2 and 3 the two numerator functions count real
calendar days, while COUPDAYS returns a declared 180 or 182.5. A 184-day real period reported
as a 180-day period cannot have its two halves add up.
This is not a defect in the family so much as a fault line running through it, and it has
already produced observable divergence upstream. The Handbook's research record documents a case
in the same bond model where Excel's PRICE derives its days-to-next-coupon as
period length minus accrued days rather than counting them directly — which agrees with
COUPDAYSNC on 30/360 and actual/actual bases, apart from the basis 0 cases of FN-COUPDAYSNC-001,
and disagrees with it, by whole days, on actual/360 and actual/365. Excel published both numbers, in
the same workbook, for the same bond. That episode is exactly this additivity failure, seen from the
consumer's side.
The reader's practical rule: on bases 0, 2 and 3, do not derive any of the three day counts
from the other two. Ask for each one.
Result and edge cases
Returns a Number, which may be fractional (182.5 at basis 3, frequency 2) and is not always
a possible day count.
- Basis 1 across a leap day gives a longer period than the same schedule position in a
non-leap year. This is the only basis under which
COUPDAYS varies with the settlement date
at all.
frequency 1, 2, 4 are the only admitted values, so the constants are 360, 180, 90 (bases
0, 2, 4) and 365, 182.5, 91.25 (basis 3).
settlement ≥ maturity is a documented error.
- Empty, missing and error arguments follow the shared call model; see
The value universe.
Errors
Documented on Microsoft's Learn page for this function, in these words (it says "generates an
error" without naming a worksheet error value):
On basis 1 COUPDAYS walks back from maturity by its own rule, not COUPPCD to COUPNCD
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.
Explanation (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.
Inputs, build details and evidence
On basis 0 COUPDAYSNC is not always COUPDAYS minus COUPDAYBS
On basis 0 (US 30/360), COUPDAYSNC is P - A. A is COUPDAYBS, the accrued days. P is a 30/360 count between the actual previous and next coupon dates, with day 31 and the last day of February both counted as day 30. COUPDAYS on basis 0 is always 360/frequency, but P need not be: when a coupon falls on the last day of February and maturity is not a month end, P can be 88, 89 or 92 for a quarter and 178 or 182 for a half year. So COUPDAYSNC(39923,50919,4,0), with coupons 2009-02-28 and 2009-05-29, is 39: P is 89 and A is 50, where 90 - 50 would give 40. With no coupon date before settlement in Excel's calendar, the period starts at serial 0: COUPDAYSNC(33,400,2,0) is 1, and for settlement 61, maturity 456 and annual coupons COUPDAYBS plus COUPDAYSNC is 90, not 360. This rule matches all 1,664 recorded number rows on basis 0, 733 of them chosen near February, month ends and the start of the calendar.
Explanation (inferred): The split into P and A reproduces every row; that Excel's code forms these two counts is inferred. For the February cases in this note only COUPDAYSNC is recorded: their A comes from the rule, not from a COUPDAYBS reading.
Inputs, build details and evidence
Version differences
The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.
The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.
Recorded environments and comparison details.
Excel 16.0 build 20430
Windows 64-bit, AMD Ryzen 7 4800H
COUPDAYS(35748, 35976, 2, 1) returned 183 (0x4066e00000000000). COUPDAYS(36452, 36891, 4, 1) returned 91 (0x4056c00000000000). 5 further recorded controls are attached. Inputs were supplied through cells using Value2. These are controls from this environment, not a same-input comparison with another build.
Observed formulas and results
COUPDAYS(35748, 35976, 2, 1) → 183
0x4066e00000000000 (cell-value2)COUPDAYS(36452, 36891, 4, 1) → 91
0x4056c00000000000 (cell-value2)COUPDAYS(36812, 47907, 4, 1) → 92
0x4057000000000000 (cell-value2)COUPDAYS(37015, 38137, 4, 1) → 89
0x4056400000000000 (cell-value2)COUPDAYS(38044, 38411, 2, 1) → 184
0x4067000000000000 (cell-value2)COUPDAYS(34911, 35216, 2, 1) → 183
0x4066e00000000000 (cell-value2)COUPDAYS(44043, 2958465, 2, 1) → 183
0x4066e00000000000 (cell-value2)
Excel 16.0 build 20131
Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics
1,060 captured inputs are indexed for this environment. Capture dates: 2026-07-19 to 2026-07-19. This is a reading count, not a comparison with another build.
Excel 16.0 build 20430
Windows, 64-bit, AMD Ryzen 7 4800H with Radeon Graphics
3,012 captured inputs are indexed for this environment. Capture dates: 2026-09-24 to 2026-09-25. This is a reading count, not a comparison with another build.