Date · spans · Nov 2026

DAYS.

The raw calendar distance between two dates — end minus start, leap days included, weekends counted. Three counting conventions measured side by side so you never ship an off-by-one.

D1
fx
=DAYS(end, start)
0
measured gallery rows
0
sourced errors fixed
0
platforms checked
// 01 — Anatomy

How DAYS works

Returns a signed whole number of calendar days (gaps). Add 1 for an inclusive count.

=DAYS(end_date, start_date)
end_dateThe later date — it comes FIRST in the signature.
start_dateThe earlier date. Reversed order gives a negative result.
.bool-moat td.res-text{color:var(--cyan);font-weight:700;font-family:var(--mono)}
spans

Three ways to count a span

The same Jan 15 → Jan 20 span, measured three ways — plus the leap-year spans that break naive 365-day assumptions.

ExpressionResultWhy
=DAYS(DATE(2024,1,20),DATE(2024,1,15))5DAYS: end minus start, exclusive of one endpoint
=DATE(2024,1,20)-DATE(2024,1,15)5Subtraction: identical semantics, no function needed
=DAYS(DATE(2024,1,20),DATE(2024,1,15))+16Inclusive: count every calendar day touched
=DAYS(DATE(2025,1,15),DATE(2024,1,15))366One year across Feb 29, 2024 → 366
=DAYS(DATE(2024,12,31),DATE(2024,1,1))365Jan 1 → Dec 31 inside 2024 → 365 gaps
=DAYS(DATE(2024,2,29),DATE(2024,2,1))28Leap February: Feb 1 → Feb 29 = 28 gaps
=DAYS(DATE(2023,2,28),DATE(2023,2,1))27Non-leap February: Feb 1 → Feb 28 = 27 gaps
⚠ DAYS takes END first, START second — the opposite of how you say it out loud. Swapping them flips the sign. And remember it counts gaps: add 1 when you need every day touched.
DAYS and plain subtraction are interchangeable for date serials. Reach for DAYS when you want the intent to read clearly in the formula bar; reach for NETWORKDAYS when weekends must be excluded.
// 03 — Try it live

Interactive DAYS playground

All presets are exact and engine-stable. Edit the grid dates and every gallery row recomputes live.

A1Sample data — click any cell to edit, the formula re-evaluates live
Result
—
✓ readyHyperFormula 3.5
// 04 — Error library

The real-world error library

8 failure patterns mined from actual user reports on Reddit, Stack Overflow and Super User — each with the authentic symptom, root cause, a fix, and a runnable formula. Not textbook theory.

// 05 — Cross-platform

Where DAYS works

DAYS requires Excel 2013+; plain date subtraction works in every version and gives identical results.

PlatformSupportNotesGotcha
✓ Supported full DAYS◐ Partial works with caveatsCompiled from public docs · verify against your build
// Go deeper

Master span arithmetic

DAYS is one piece. The full course walks the toolkit end to end with live, measured examples.

  • End date first — the reversed argument order
  • Negative spans and sign errors
  • DAYS vs subtraction vs DATEDIF
  • Leap-year spans and 366-day years
Free while in beta
Browse the function library

No account needed. Every page has a live playground.

// 07 — FAQ

Frequently asked