Dates and Times

Why Excel Shows a Date as a Number

Why Excel shows a date as a number such as 45000, what usually causes it, how to change the format back, and why some dates look four years off.

On this page
  1. The usual cause: the cell format
  2. Formulas that return a number
  3. Dates that lose their format
  4. Dates that look about four years off
  5. Check what the cell holds
  6. Where to go next

Excel doesn’t store dates as dates. It stores each one as a serial number, and a number format decides how that number looks. A cell formatted as General or Number shows the serial. So March 15, 2023, appears as 45000.

The usual cause: the cell format

Select the cell, press Ctrl+1 (Cmd+1 on a Mac), go to the Number tab, choose Date, and pick a type. You can also open the Number Format list on the Home tab and choose Short Date.

Changing the format doesn’t change the value. Formulas that use the cell keep working, and the date still sorts and calculates correctly.

Formulas that return a number

Excel formats some formula results automatically. Subtracting dates or adding days to a date often gets a date format, but not always. If a formula result shows as a number, change the cell to a date format. If it shows a date that is wrong, the formula is the problem, not the format.

A subtraction that shows as a date is covered in how to count days between two dates in excel.

Dates that lose their format

Pasting from a web page, an email or a text file often brings the number without the date format. Importing a CSV file can do the same. Reapply the date format to the column. If the values still won’t behave like dates, the problem is text rather than format, and excel not recognizing dates as dates explains the fix.

Dates that look about four years off

Excel for Windows uses the 1900 date system by default. Some workbooks, especially ones made on older Mac versions, use the 1904 date system instead. The two systems start counting from days that are 1,462 days apart, so the same stored number displays as a date about four years later in the 1904 system.

If two workbooks disagree by about four years, check the date system setting. It’s in Excel’s options, under Advanced, in the section for the workbook’s calculation settings.

Check what the cell holds

ISNUMBER returns TRUE for a real date or number and FALSE for text:

=ISNUMBER(A2)

If the result is FALSE, the cell holds text that looks like a date. For a formula whose result is unexpected, how to use evaluate formula in excel shows how to step through each part of the formula.

Where to go next

Most “date as number” problems take a minute to fix: check the format, then confirm the value with ISNUMBER. If the number looks right but the date is still wrong, the date system or the source of the data is usually the cause.

The complete guide to dates and times

How to Work With Dates in Excel
Read the guide

Keep exploring

Guides from other topics

All topics →

How to Look Up Data in Excel

How lookups work in Excel, with VLOOKUP, XLOOKUP and INDEX with MATCH, how to set up your data, and how to choose the right function for the job.

Lookups 3 min read