Financial modelling, revenue accounting, and commercial contracting in Google Sheets frequently require computing dates that fall precisely on the final calendar day of a month. When calculating loan maturity dates, subscription renewals, tax declaration schedules, or monthly interest reconciliations, simply adding 30 or 31 days to a transaction date leads to progressive calculation drift due to varying month lengths and leap years.
Google Sheets provides the native EOMONTH (End of Month) function to solve this recurring problem. By accepting a starting date serial and an integer month offset, EOMONTH returns the exact last day of the past, current, or future month automatically. This guide explains the syntax, parameter options, and practical operational formulas for EOMONTH in Google Sheets.
Understanding the EOMONTH Syntax and Parameters
The EOMONTH function calculates the serial date number representing the final day of a month that is a specified number of months before or after a reference date.
The structural formula syntax is defined as follows:
=EOMONTH(start_date, months)
The parameters operate as follows:
- start_date: The initial reference date from which the calculation originates. This must be a valid date serial number, a cell reference containing a date, or a date generated via
DATE,TODAY, orDATEVALUE. - months: The integer number of months to offset before or after
start_date:0: Returns the last day of the current month containingstart_date.- Positive integer (e.g.
1,3,12): Projects forward into future months. - Negative integer (e.g.
-1,-6): Steps backwards into preceding months.
Common Formula Applications and Examples
The following examples demonstrate how EOMONTH calculates critical financial and billing intervals:
| Formula | Start Date | Months Offset | Calculated Result |
|---|---|---|---|
=EOMONTH(A2, 0) |
2026-02-14 |
0 |
2026-02-28 (Standard February) |
=EOMONTH(A2, 1) |
2026-01-15 |
1 |
2026-02-28 (Next month-end) |
=EOMONTH(A2, 3) |
2026-03-01 |
3 |
2026-06-30 (Quarter-end) |
=EOMONTH(A2, -1) |
2026-05-20 |
-1 |
2026-04-30 (Previous month-end) |
=EOMONTH(A2, 0) + 1 |
2026-03-15 |
0 |
2026-04-01 (First day of next month) |
Calculating the First Day of the Current or Next Month
Spreadsheet software historically lacks a dedicated “FIRSTOFMONTH” function. You can calculate the first day of any month using EOMONTH combined with simple integer arithmetic:
First Day of the Current Month
To find the first day of the month containing A2, calculate the last day of the previous month (offset -1) and add 1 calendar day:
=EOMONTH(A2, -1) + 1
If cell A2 holds 2026-05-18, EOMONTH(A2, -1) returns 2026-04-30; adding 1 yields 2026-05-01.
First Day of the Next Month
To find the first day of the upcoming calendar month, compute the current month-end (offset 0) and add 1 day:
=EOMONTH(A2, 0) + 1
Calculating Remaining Days in a Month
In payroll and pro-rata billing models, analysts frequently need to determine how many calendar days remain in the active billing cycle. Subtract the current date from its corresponding month-end date:
=EOMONTH(TODAY(), 0) - TODAY()
This dynamic formula automatically updates daily, returning the exact countdown of remaining days until the month concludes.
Automating Entire Columns with MAP and LAMBDA
When applying EOMONTH down dynamic enterprise datasets, dragging formulas manually wastes time and creates formula maintenance issues. Combine EOMONTH with MAP and LAMBDA to process an entire table column automatically:
=MAP(A2:A100, LAMBDA(invoice_date, IF(invoice_date="", "", EOMONTH(invoice_date, 1))))
This dynamic array formula monitors the date entries in column A, automatically populating the month-end due date across column B while ignoring empty rows cleanly.
Troubleshooting Common Formatting and Evaluation Errors
- Cell Displays Five-Digit Number: If entering
=EOMONTH(A2, 0)displays an unformatted serial number such as46081, Google Sheets is evaluating the date correctly but displaying it as raw serial days. Select the cell, navigate to Format > Number > Date, and apply your preferred regional date format. - #VALUE! Error: Occurs when the
start_dateis stored as text rather than a recognized date serial. Inspect the input cell or wrap the reference inDATEVALUE()to parse imported strings cleanly. - Leap Year Handling:
EOMONTHautomatically calculates leap years (such as February 2028 returning2028-02-29) without requiring custom conditional formulas.