In Excel: subtract the dates directly — =B2-A2 returns the number of days — and use =NETWORKDAYS(A2,B2) for working days (Mon–Fri, both dates inclusive); format the result as a Number, not a Date.
Breakdown: 0 years · 11 months · 30 days
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
Dates are serial numbers, so date arithmetic is plain subtraction: end minus start gives days. NETWORKDAYS counts only Monday–Friday and can exclude a holiday list as its third argument. For calendar-style answers ("3 years, 2 months, 12 days") the undocumented-but-working DATEDIF function decomposes the gap with its "y", "ym", and "md" units. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. Treat “excel number of days in a month” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected cells shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.
A worked example
A project starts 2026-01-01 (A2) and ends 2026-12-31 (B2). =B2-A2 returns 364 days. =NETWORKDAYS(A2,B2) returns 261 working days. =DATEDIF(A2,B2,"m") returns 11 full months. If the result shows as a strange date like 30.12.1900, the cell is formatted as Date — switch it to Number. Deadlines, ages, tenancy periods, SLA clocks — counting days (or working days) between two dates is one of the most common spreadsheet questions there is. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. The short version of “excel number of days in a month”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.
Common mistakes
- Result cell formatted as Date, showing 30.12.1900 instead of 364.
- Text dates that look right but cannot be subtracted —
DATEVALUEor re-entry fixes them. - Forgetting
NETWORKDAYScounts BOTH endpoints: Monday to Friday of one week is 5, not 4. - Relying on
DATEDIF's "md" unit near month ends — Microsoft documents it as unreliable.
Frequently asked questions
How do I count days between two dates in Excel?
Subtract them: =B2-A2, with the result cell formatted as Number.
How do I get working days only?
=NETWORKDAYS(start,end) for Mon–Fri, or =NETWORKDAYS.INTL for custom weekends; add a holiday range as the last argument.
Why isn't DATEDIF in Excel's function list?
It is a Lotus 1-2-3 compatibility function: undocumented in the wizard but fully functional when typed — =DATEDIF(start,end,"y").