Excel Date ↔ Number Converter Online

Convert an Excel date serial (e.g. 45245.5) to a real date and back. Two-way converter that accounts for the 1900 leap year bug and the 1900/1904 date systems.

Days since 1900-01-00; the fractional part is time of day. Today's value is around 46000.
📘
Excel turning your numbers into dates?

Read our guide: 5 ways to stop Excel and Google Sheets from auto-converting numbers to dates.

Open guide →

How Excel stores dates

Inside Excel and Google Sheets every date is just a number. Day 1 = January 1, 1900; day 2 = January 2, and so on. Today's value is around 46000. The fractional part encodes time of day: 0.25 = 06:00, 0.5 = 12:00, 0.75 = 18:00. When a cell shows a date, there's always a plain number behind it — the date format just hides it.

This becomes a problem on export: a CSV or JSON receives the number (45245), not the string '2024-01-01'. Importing into a database, Python, or another system requires turning it back into a date — which is exactly what this converter does.

Excel uses a historical quirk: it treats 1900 as a leap year even though it isn't (per the Gregorian rule: divisible by 100 but not 400). So Excel has a non-existent 'day 60' = 29 February 1900. For all dates after 1 March 1900 this doesn't matter, but for earlier dates it can be off by 1 day.

When you'll need this converter

CSV shows a number instead of a date

You exported from Excel/Sheets and got '45245.5' instead of a proper date. Paste it — get the regular YYYY-MM-DD date back.

Importing into Python / pandas

When reading xlsx via pandas, dates sometimes come through as float. Use the converter to verify a specific value before configuring pd.to_datetime(..., unit='D', origin='1899-12-30').

Migrating a table to SQL

If your source stores dates as Excel numbers but the SQL table expects a timestamp — you need conversion. The converter shows the Unix timestamp ready to paste into a query.

Building a report

Crafting a report formula and need the Excel serial of a specific date (e.g. for SUMIFS over a range) — switch to 'Date → Excel number'.

FAQ

Why is today's Excel date around 46000?

Excel counts days from January 1, 1900. About 46,000 days have passed since then — hence the magnitude. Tomorrow it'll be 46001, the day after 46002, and so on. The fractional part is the share of the day already elapsed.

What does the fractional part after the dot mean?

It's time of day as a fraction of 24 hours. 0.25 = 6:00, 0.5 = 12:00, 0.75 = 18:00. So 45245.5 is January 1, 2024 at 12:00.

What's the formula to convert Excel number to Unix timestamp?

unix_seconds = (excel_number − 25569) × 86400. Where 25569 is the Excel serial of 1970-01-01 (the start of the Unix epoch). Reverse: excel_number = unix_seconds / 86400 + 25569.

What is the 1900 leap year bug, do I need to care?

Excel mistakenly treats 1900 as a leap year. Because of this, Excel day 60 = February 29, 1900 — a date that never existed. For any date after March 1, 1900 the formula still works correctly. It only matters for historical 19th-century data.

What about Excel for Mac (1904 date system)?

Old Mac Excel used 1904-01-01 as the start (the '1904 date system'). To convert from that format — add 1462 to the number, and you'll get the equivalent in the regular 1900-based system. Modern Mac Excel defaults to 1900-based, but the option still exists.

How do I stop Excel from auto-converting numbers to dates?

In Excel: set cell format to 'Text' or prefix the value with an apostrophe ('001234). In Google Sheets: Format → Number → Plain text before pasting. More tricks in our blog post about Excel auto-converting numbers to dates.

Is Java timestamp something different?

Java and Unix share the same epoch — 1970-01-01 UTC — Java just defaults to milliseconds (Date.now() = unix_sec × 1000). Excel is a completely different epoch (1900) and a different unit (days). For Java/Unix time, use our Unix Timestamp Converter.