How Excel stores dates
Each invoice has a date and a number of days to pay. The due date is that many days later.
keyboard Typing formulas is easiest on a computer with a keyboard.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Invoice date | Days to pay | Due date | |
| 2 | 3 Apr 2026 | 30 | ||
| 3 | 2 Jan 2025 | 30 | ||
| 4 | 21 Jan 2026 | 60 | ||
| 5 | 18 Dec 2026 | 30 | ||
| 6 | 8 Dec 2026 | 30 | ||
| 7 | 25 Jul 2025 | 14 | ||
| 8 | 24 Mar 2026 | 30 | ||
| 9 | ||||
| 10 | ||||
| 11 | ||||
| 12 |
How DATE and YEAR and MONTH and DAY works
What is a date to Excel?
A number: the count of days since 1 January 1900. 1 Jan 1900 is 1, and 15 March 2026 is 46096. The cell's format decides whether you see 46096 or 15 Mar 2026; the value underneath is the same.
Why does that matter?
Because dates are numbers, you can do maths with them:
=A2+30is 30 days after the date inA2.=B2-A2is the number of days between two dates.=A2>B2asks whetherA2is later.
How do I build a date from parts?
=DATE(year, month, day), for example=DATE(2026,3,15). It copes with overflow: month 13 is January of the next year, and day 0 is the last day of the month before.How do I take a date apart?
YEAR(A2),MONTH(A2)andDAY(A2)give each part as a number.What if a date is stuck as text?
A date typed in a format Excel doesn't recognise, or imported as text, sits on the left of the cell and can't be used in sums.
DATEVALUEor Text to Columns turns it into a real date.
Know someone fighting with a spreadsheet? Send them this page.