How Excel stores dates

1 / 4

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.

A1
ABCD
1Invoice dateDays to payDue date
23 Apr 202630
32 Jan 202530
421 Jan 202660
518 Dec 202630
68 Dec 202630
725 Jul 202514
824 Mar 202630
9
10
11
12
date, days
due dates
Type to enter a value or a formula starting with =. F2 edits, F4 adds $ to a reference.
Study notes

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+30 is 30 days after the date in A2.
    • =B2-A2 is the number of days between two dates.
    • =A2>B2 asks whether A2 is 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) and DAY(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. DATEVALUE or Text to Columns turns it into a real date.

Know someone fighting with a spreadsheet? Send them this page.