COUPDAYBS in Google Sheets: How It Works

How-to basics · Updated November 23, 2026

The COUPDAYBS function in Google Sheets calculates the number of days from the beginning of the coupon period (the first day of the interest payment period) to the settlement date. For example, if a bond pays interest semi-annually and you settle it 40 days into the current coupon period, COUPDAYBS returns 40.

What COUPDAYBS Does

COUPDAYBS is one of several coupon-related financial functions in Google Sheets. It specifically answers: “How many days have already elapsed in the current interest period as of the settlement date?” This value is useful for calculating accrued interest, which is the interest that has built up since the last coupon payment and is typically paid by the buyer to the seller when a bond changes hands.

The function follows a standard financial convention: the coupon period is defined by the bond’s maturity date and the frequency of payments. The “first coupon” mentioned in Google’s documentation refers to the start of the current coupon period, not necessarily the very first coupon ever paid on the bond.

Syntax and Arguments

The syntax is:

COUPDAYBS(settlement, maturity, frequency, [day_count_convention])

All arguments except the last are required:

  • settlement – The date when the bond is purchased or traded. This must be a valid date reference (e.g., A2) or a date entered with DATE().
  • maturity – The date when the bond expires and the principal is repaid.
  • frequency – The number of coupon payments per year. Common values are 1 (annual), 2 (semiannual), or 4 (quarterly).
  • day_count_convention – Optional. An integer specifying the day-count basis. If omitted, it defaults to 0 (US (NASD) 30/360).

The day_count_convention options are:

  • 0 – US (NASD) 30/360
  • 1 – Actual/actual
  • 2 – Actual/360
  • 3 – Actual/365
  • 4 – European 30/360

How to Use COUPDAYBS in a Spreadsheet

Let’s walk through a concrete example. Suppose you buy a bond on March 1, 2025, and it matures on December 31, 2030. The bond pays interest semiannually (frequency = 2). You want to know how many days have passed since the last coupon date.

Set up your sheet like this:

  • A1: 3/1/2025 (settlement)
  • A2: 12/31/2030 (maturity)
  • A3: 2 (frequency)

In cell A4, enter:

=COUPDAYBS(A1, A2, A3)

With the default US 30/360 convention, the function calculates the days from the previous coupon date to settlement. For a semiannual bond with maturity on Dec 31, the coupon dates are June 30 and Dec 31. The previous coupon date before March 1, 2025, is Dec 31, 2024. Under the 30/360 convention, the days from Dec 31 to Mar 1 are calculated as: (30-31) + 30 + 1 = 30 days? Actually, the US 30/360 convention treats each month as 30 days, so from Dec 31 to Jan 1 is 1 day (since Dec 31 is treated as Dec 30), then Jan has 30 days, Feb has 30 days, and Mar 1 is 1 day, totaling 1+30+30+1 = 62 days? Let’s verify: The function returns 62 for this example. So the result is 62 days.

If you change the day count to Actual/actual (convention 1), the function returns 60 days (from Dec 31 to Mar 1 in a non-leap year: 31 days in Jan + 28 in Feb + 1 = 60).

Common Errors and How to Fix Them

Users often see the #VALUE! or #NUM! errors. Here are typical causes:

  • Invalid dates – If settlement or maturity is not a valid date, the function returns #VALUE!. Use DATE(2025,3,1) instead of text like “3/1/2025” if you’re entering the date directly in the formula.
  • Settlement later than maturity – The settlement date must be before the maturity date; otherwise the function returns #NUM!.
  • Frequency not a valid number – Frequency must be 1, 2, or 4. Any other value causes #NUM!.
  • Day count convention out of range – The optional argument must be between 0 and 4; otherwise you get #NUM!.

Also note that if the settlement date falls exactly on a coupon date, COUPDAYBS returns 0 (since the period just started).

Related Coupon Functions in Google Sheets

COUPDAYBS is part of a family of coupon functions that work together. Knowing them helps you understand the full picture:

  • COUPDAYS – Returns the total number of days in the coupon period that contains the settlement date.
  • COUPDAYSNC – Returns the number of days from settlement to the next coupon date.
  • COUPNCD – Returns the next coupon date after settlement.
  • COUPPCD – Returns the previous coupon date before settlement.
  • COUPNUM – Returns the number of coupon payments between settlement and maturity.

For example, using the same bond as above, =COUPDAYS(A1,A2,A3) returns 180 (under 30/360) or 181 (under actual/actual). And =COUPDAYSNC(A1,A2,A3) returns 118 (under 30/360) because 62 + 118 = 180.

Differences from Excel

Google Sheets’ COUPDAYBS is nearly identical to Excel’s COUPDAYBS function. Both use the same syntax and day-count conventions. The main difference is that in Excel, dates are serial numbers, so you might see a number like 45678 instead of a date if the cell isn’t formatted. In Google Sheets, dates are also stored as numbers internally, but they display as dates by default. Also, Google Sheets handles the optional day_count_convention argument exactly the same way as Excel.

One subtle difference: in Excel, the settlement and maturity dates are truncated to integers (time is ignored). Google Sheets does the same, so if you enter a date with a time component, it’s ignored for the calculation.

Practical Use Case: Accrued Interest Calculation

Financial analysts often use COUPDAYBS to compute accrued interest. The formula for accrued interest is:

Accrued Interest = (Coupon Rate × Face Value / Frequency) × (COUPDAYBS / COUPDAYS)

Suppose you have a $1,000 bond with a 5% annual coupon, paid semiannually. Using the same dates as before (settlement 3/1/2025, maturity 12/31/2030), the coupon payment per period is $1,000 × 5% / 2 = $25. With COUPDAYBS = 62 and COUPDAYS = 180 (under 30/360), the accrued interest is:

= (0.05 * 1000 / 2) * (62 / 180)

This returns $8.61. That’s the amount the buyer would owe the seller for interest earned since the last coupon date.

Frequently Asked Questions

Why does COUPDAYBS return a different number than I expected?
Most likely because of the day_count_convention. The default 30/360 treats every month as 30 days, so February 28 is treated as 30 days, and March 1 is 1 day after Feb 30. If you expect actual calendar days, use convention 1 (Actual/actual).

Can I use COUPDAYBS for bonds with irregular first or last periods?
Yes, but the function assumes regular coupon periods based on the maturity date and frequency. For bonds with a short first coupon period (like a bond issued mid-period), you may need to adjust the maturity date or use a different calculation. In practice, COUPDAYBS works best for standard bonds.

What if my settlement date is a weekend or holiday?
The function does not adjust for weekends or holidays. It simply counts days based on the day-count convention. If you need business-day adjustments, you’d have to incorporate a holiday calendar manually.

Is there a way to see the coupon dates directly?
Yes, use COUPNCD and COUPPCD to get the next and previous coupon dates. For example, =COUPPCD(A1,A2,A3) returns the previous coupon date before settlement.

Does COUPDAYBS work with dates entered as text?
If you enter a date as text like “3/1/2025”, Google Sheets may interpret it as a date, but it’s safer to use DATE(2025,3,1) or a cell reference to a date-formatted cell. Text dates can cause #VALUE! errors.

Final Tips for Accurate Use

  • Always check that settlement is before maturity.
  • Use the DATE() function or cell references for dates, not text.
  • Remember that frequency must be 1, 2, or 4.
  • If you need actual days, specify day_count_convention as 1.
  • Combine with COUPDAYS and COUPDAYSNC to verify your results: COUPDAYBS + COUPDAYSNC should equal COUPDAYS (with rounding differences under some conventions).

With these details, you can confidently use COUPDAYBS to analyze bond cash flows and accrued interest in Google Sheets.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.