Financial functions

COUPPCD

Matches all 5,591 recorded answers

Recorded: 5,584 in the answer bank and 7 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicCOUPPCD
BulgarianCOUPPCD
CzechCOUPPCD
DanishKUPONDAG.FORRIGE
GermanCOUPPCD
GreekCOUPPCD
English (Australia)COUPPCD
English (United Kingdom)COUPPCD
English (United States)COUPPCD
SpanishCUPON.FECHA.L1
EstonianCOUPPCD
FinnishKORKOPÄIVÄ.EDELLINEN
FrenchDATE.COUPON.PREC
HebrewCOUPPCD
CroatianCOUPPCD
HungarianUTOLSÓ.SZELVÉNYDÁTUM
IndonesianCOUPPCD
ItalianCOUPPCD
JapaneseCOUPPCD
KoreanCOUPPCD
LithuanianCOUPPCD
LatvianCOUPPCD
NorwegianOBLIG.DAG.FORRIGE
DutchCOUP.DATUM.VB
PolishWYPŁ.DATA.POPRZ
Portuguese (Brazil)COUPPCD
Portuguese (Portugal)CUPDATAANT
RomanianCOUPPCD
RussianДАТАКУПОНДО
SlovakCOUPPCD
SlovenianCOUPPCD
Serbian (Latin)COUPPCD
SwedishKUPFKD
ThaiCOUPPCD
TurkishKUPONGÜNÖKT işlevi
UkrainianCOUPPCD
VietnameseCOUPPCD
Chinese (Simplified)COUPPCD
Chinese (Hong Kong)COUPPCD
Chinese (Traditional)COUPPCD

Names from Microsoft's support site.

What it does

COUPPCD(settlement, maturity, frequency, [basis])

COUPPCD(settlement, maturity, frequency, [basis]) returns the coupon date on or before the settlement date — the start of the current coupon period — as an Excel date serial.

It is the mirror of COUPNCD, and the two together bracket the period that COUPDAYBS, COUPDAYSNC and COUPDAYS measure. The schedule it selects from is described once, on COUPNCD: coupon dates run backwards from maturity in steps of 12/frequency months, with month-end anchoring, and there is no issue date to stop them.

The previous coupon date is notional, not historical. The schedule is generated from maturity alone, so COUPPCD will happily return a date before the security existed. That is the intended behaviour for accrual arithmetic on a seasoned bond, and it is a trap for anyone using the function to ask "when was the last coupon actually paid".

A documentation gap worth recording

The quoted one-line description is Microsoft's text, from its support article https://support.microsoft.com/en-us/office/couppcd-function-2eb50473-6ee9-4052-a206-77a9a385d5b3.

Arguments

COUPPCD(settlement, maturity, frequency, [basis]) — the family's shared four arguments, with Microsoft's wording quoted on COUPDAYBS.

ArgumentMeaningRequired?
settlementThe security's settlement date.Required
maturityThe security's maturity date.Required
frequencyCoupon payments per year: 1, 2 or 4.Required
basisThe day-count basis, 0–4.Optional, defaults to 0

The standard five-row basis table is documented on this page — 0 or omitted = US (NASD) 30/360, 1 = actual/actual, 2 = actual/360, 3 = actual/365, 4 = European 30/360.

basis cannot change the answer. A coupon date is a calendar date; no day-count convention moves it. basis is nevertheless validated, so an out-of-range value converts a well-defined date into an error. The same non-participating-but-fatal argument appears on COUPNCD and COUPNUM.

Microsoft documents that "All arguments are truncated to integers." Dates should be produced by DATE or by other formulas rather than typed as text; ordinary coercion rules are in Coercion and lifting.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Quirks

Result and edge cases

  • Month-end maturities produce month-end previous-coupon dates: a 31 August maturity at frequency 2 gives 28 or 29 February, not the 28th of some other month.
  • Early settlements are accepted; the schedule extends backwards past any plausible issue date, and when the coupon before settlement falls before 1900 Excel returns 0 (FN-COUPNUM-001).
  • settlement ≥ maturity is a documented error, so the function never returns maturity itself as a previous coupon date.
  • Empty, missing and error arguments follow the shared call model.

Errors

Documented on Microsoft's Learn page for this function, in these words (it says "generates an error" without naming a worksheet error value):

Condition (documented)Documented outcome
settlement or maturity is not a valid dateerror
frequency is any number other than 1, 2 or 4error
basis < 0 or basis > 4error
settlement ≥ maturityerror

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.

FormulaExcelMathematical value
COUPDAYS(35748, 35976, 2, 1)
Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
Inputs and reference value

Number supplied through a cell.

settlement: 35748
0x40e1748000000000

maturity: 35976
0x40e1910000000000

frequency: 2
0x4000000000000000

basis: 1
0x3ff0000000000000

183
0x4066e00000000000
—
COUPDAYS(36452, 36891, 4, 1)
Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
Inputs and reference value

Number supplied through a cell.

settlement: 36452
0x40e1cc8000000000

maturity: 36891
0x40e2036000000000

frequency: 4
0x4010000000000000

basis: 1
0x3ff0000000000000

91
0x4056c00000000000
—
COUPDAYS(36812, 47907, 4, 1)
Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
Inputs and reference value

Number supplied through a cell.

settlement: 36812
0x40e1f98000000000

maturity: 47907
0x40e7646000000000

frequency: 4
0x4010000000000000

basis: 1
0x3ff0000000000000

92
0x4057000000000000
—
COUPDAYS(37015, 38137, 4, 1)
Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
Inputs and reference value

Number supplied through a cell.

settlement: 37015
0x40e212e000000000

maturity: 38137
0x40e29f2000000000

frequency: 4
0x4010000000000000

basis: 1
0x3ff0000000000000

89
0x4056400000000000
—
COUPDAYS(38044, 38411, 2, 1)
Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
Inputs and reference value

Number supplied through a cell.

settlement: 38044
0x40e2938000000000

maturity: 38411
0x40e2c16000000000

frequency: 2
0x4000000000000000

basis: 1
0x3ff0000000000000

184
0x4067000000000000
—
COUPDAYS(34911, 35216, 2, 1)
Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
Inputs and reference value

Number supplied through a cell.

settlement: 34911
0x40e10be000000000

maturity: 35216
0x40e1320000000000

frequency: 2
0x4000000000000000

basis: 1
0x3ff0000000000000

183
0x4066e00000000000
—
COUPPCD(44043, 2958465, 2, 1)
Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
Inputs and reference value

Number supplied through a cell.

settlement: 44043
0x40e5816000000000

maturity: 2958465
0x4146924080000000

frequency: 2
0x4000000000000000

basis: 1
0x3ff0000000000000

44012
0x40e57d8000000000
—
COUPNCD(44043, 2958465, 2, 1)
Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
Inputs and reference value

Number supplied through a cell.

settlement: 44043
0x40e5816000000000

maturity: 2958465
0x4146924080000000

frequency: 2
0x4000000000000000

basis: 1
0x3ff0000000000000

44196
0x40e5948000000000
—
COUPDAYS(44043, 2958465, 2, 1)
Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H
Inputs and reference value

Number supplied through a cell.

settlement: 44043
0x40e5816000000000

maturity: 2958465
0x4146924080000000

frequency: 2
0x4000000000000000

basis: 1
0x3ff0000000000000

183
0x4066e00000000000
—

Inputs, build details and evidence

COUPNUM is #NUM! when the coupon before settlement falls before 1900

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.

FormulaExcelMathematical value
COUPNUM(33, 400, 2, 0)
Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file
Inputs and reference value

Number supplied through a cell.

settlement: 33
0x4040800000000000

maturity: 400
0x4079000000000000

frequency: 2
0x4000000000000000

basis: 0
0x0000000000000000

#NUM!—
COUPNUM(34, 400, 2, 0)
Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file
Inputs and reference value

Number supplied through a cell.

settlement: 34
0x4041000000000000

maturity: 400
0x4079000000000000

frequency: 2
0x4000000000000000

basis: 0
0x0000000000000000

2
0x4000000000000000
—
COUPNUM(0, 367, 2, 0)
Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file
Inputs and reference value

Number supplied through a cell.

settlement: 0
0x0000000000000000

maturity: 367
0x4076f00000000000

frequency: 2
0x4000000000000000

basis: 0
0x0000000000000000

#NUM!—
=COUPNUM(0,182,2,0)
Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA
Inputs and reference value

Typed formula.

#NUM!—
=COUPNUM(A1,400,2,0)
Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA
Inputs and reference value

Number supplied through a cell.

A1: 0
0x0000000000000000

#NUM!—
=COUPPCD(A1,400,2,0)
Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA
Inputs and reference value

Number supplied through a cell.

A1: 0
0x0000000000000000

0
0x0000000000000000
—
=COUPNCD(A1,400,2,0)
Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA
Inputs and reference value

Number supplied through a cell.

A1: 0
0x0000000000000000

34
0x4041000000000000
—

Inputs, build details and evidence

How to implement

Numerical notes

  1. The answer is an integer-valued date serial; there is no floating-point content.
  2. Month-end anchoring is a modelling decision with no documentary support, and it is where two careful implementations will part company. State the rule explicitly rather than inheriting it from whatever a date library happens to do.
  3. Validate basis and then ignore it. Computing this date through a day-count routine would introduce a dependency the function does not have.
  4. The roll-forward branch decides the equality case and should be settled before anything else, because it also fixes COUPDAYBS's zero and COUPNUM's count on the same input.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

COUPPCD · 4 lines · calc-func/src/catalogue/bonds.rs on GitHub
15 couppcd_fn "COUPPCD" (3, 4) [V "settlement", V "maturity", V "frequency", V "basis"] |s, a, sv| {
    let (settlement, maturity, frequency, b) = coupon_args(s, a, sv)?;
    date_out(s, sv, coupon::couppcd_kernel(settlement, maturity, frequency, b))
}
couppcd_kernel · 10 lines · calc-func/src/ported/coupon_family.rs on GitHub
pub fn couppcd_kernel(
    settlement: f64,
    maturity: f64,
    frequency: f64,
    basis: Option<f64>,
) -> Result<f64, WorksheetErrorCode> {
    let ctx = parse_coupon_context(settlement, maturity, frequency, basis)?;
    let period = locate_coupon_period(ctx)?;
    Ok(period.previous as f64)
}

Kernels shared with other functions

Argument and result plumbing

  • fail catalogue/kit
  • num catalogue/kit

No implementation has been published with a Handbook test suite for this function.

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.

Excel 16.0 buildPlatform and CPUCaptured inputs
20131Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics1,060
20430Windows, 64-bit, AMD Ryzen 7 4800H with Radeon Graphics3,012

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

COUPPCD(44043, 2958465, 2, 1) returned 44012 (0x40e57d8000000000). 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
  • COUPPCD(44043, 2958465, 2, 1) → 44012
    0x40e57d8000000000 (cell-value2)

Excel 16.0.20527.20088

Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA

=COUPPCD(A1,400,2,0) returned 0 (0x0000000000000000). 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
  • =COUPPCD(A1,400,2,0) → 0
    0x0000000000000000 (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.

Alternatives

Relationships

  • COUPNCD — the forward end of the same period, and the page that hosts the shared schedule description.
  • COUPDAYBS — the day count from this date to settlement. On bases 1, 2 and 3 it equals settlement − COUPPCD; on the 30/360 bases it does not.
  • COUPDAYS — the period length. COUPNCD − COUPPCD is the actual length and equals COUPDAYS only under basis 1, and not always there (FN-COUPDAYS-001).
  • COUPNUM — the count of remaining coupons on the same ladder.
  • EDATE — the general month-stepping function. EDATE clamps the day of month but does not make month-ends sticky, so EDATE(maturity, −n × 12/frequency) reproduces COUPPCD for ordinary maturities and diverges for month-end ones.
  • ACCRINT — the function that does know an issue date, for cases where the notional previous coupon date is the wrong accrual anchor.
  • Confused with: "the date of the last coupon actually paid", which this function does not answer for a bond issued after the notional date it returns.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents