Windows Epoch Time Converter: How to Use It
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
An epoch time converter for Windows translates between Unix/POSIX time (seconds since January 1, 1970 UTC) and human-readable dates and times. You enter a 10-digit (or 13-digit for milliseconds) number and get the corresponding UTC date, or you enter a date and get the epoch value. This page explains how to do the conversion manually, with built-in Windows tools, or with a simple online calculator.
Formula
The core formula for converting epoch seconds to a date in Excel or a spreadsheet is:
Date = (EpochSeconds / 86400) + 25569
Where:
- EpochSeconds – the number of seconds since 1970-01-01 00:00:00 UTC (for milliseconds, divide by 1000 first).
- 86400 – the number of seconds in a day (24 × 60 × 60).
- 25569 – the serial number of 1970-01-01 in Excel’s date system (which starts at 1900-01-01 = 1).
To go the other way (date to epoch): EpochSeconds = (DateSerialNumber – 25569) × 86400. For UTC, use the date serial number as-is; for local time, adjust by the timezone offset.
Worked Example
Using the default value of 1,700,000,000 epoch seconds:
- Divide by 86400: 1,700,000,000 ÷ 86400 = 19675.9259259…
- Add 25569: 19675.9259259 + 25569 = 45244.9259259
- In Excel, format this number as a date: 45244.9259259 corresponds to 2023-11-14 22:13:20 UTC (since 0.9259259 × 24 = 22.2222 hours).
So 1,700,000,000 epoch seconds equals November 14, 2023, 22:13:20 UTC. The calculator above gives the same result (shown as a serial number; format it in your spreadsheet).
Why Windows Doesn’t Have a Built-In Converter
Windows itself does not include a dedicated epoch converter utility. However, you can use several built-in tools:
- PowerShell – a one-liner converts epoch to a DateTime object:
[DateTimeOffset]::FromUnixTimeSeconds(1700000000).UtcDateTime. - Command Prompt (cmd) – no direct command, but you can use PowerShell from cmd or write a small script.
- Excel/Google Sheets – as shown in the formula, you can convert with simple arithmetic and cell formatting.
- Windows Calculator – only does basic arithmetic; you would need to manually divide and add, which is error-prone.
For most users, the easiest method is to use an online converter or a spreadsheet formula. If you work with epoch values frequently, a small PowerShell script can be saved as a .ps1 file and run whenever needed.
Common Mistakes and Pitfalls
Several errors are common when converting epoch time on Windows:
- Milliseconds vs. seconds – Many APIs return 13-digit values (milliseconds). Dividing by 1000 first is essential. For example, 1700000000000 ms = 1700000000 s.
- Timezone confusion – Epoch is always UTC. If you convert to local time without adjusting, you’ll be off by your offset (e.g., UTC+2 gives 2 hours ahead).
- Excel’s leap year bug – Excel incorrectly treats 1900 as a leap year, so dates before March 1, 1900 are off by one day. This rarely matters for epoch (which starts in 1970), but it’s a known quirk.
- Negative epoch values – For dates before 1970, the epoch number is negative. The formula still works, but Excel may display a series of ##### if the cell isn’t wide enough.
How to Choose the Right Converter
When selecting a converter (online or offline), consider:
- Precision – Does it handle milliseconds? Does it show fractional seconds?
- Timezone support – Can it show both UTC and your local time?
- Batch conversion – If you have many timestamps, a spreadsheet formula or a script is more efficient than a one-by-one online tool.
- Offline availability – If you work with sensitive data, an offline method (PowerShell, Excel) avoids sending timestamps to a web service.
For a quick one-off conversion, any reputable online converter works. For repeated use, a PowerShell function or Excel template is more reliable.
Alternatives to Windows Tools
Besides the methods above, you can use:
- Online converters – Many websites offer free epoch converters; they are convenient but require internet access.
- Programming languages – Python, JavaScript, C#, and others have built-in functions (e.g., Python’s
datetime.fromtimestamp). - Mobile apps – Some apps provide epoch conversion on the go, useful for developers.
- Browser extensions – Some extensions add epoch conversion to the context menu, but they may not be maintained.
Each alternative has trade-offs in speed, accuracy, and privacy. For most Windows users, PowerShell or Excel is sufficient.
Frequently Asked Questions
What is epoch time?
Epoch time (also called Unix time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC, not counting leap seconds. It is a standard way to represent a point in time in many computer systems.
How do I convert epoch time to a readable date in Windows without extra software?
You can use PowerShell: open PowerShell and type [DateTimeOffset]::FromUnixTimeSeconds(1700000000).UtcDateTime and press Enter. This outputs the UTC date. For local time, replace UtcDateTime with LocalDateTime.
Why does my epoch number have 13 digits instead of 10?
That means the value is in milliseconds, not seconds. Divide the number by 1000 before converting. For example, 1700000000000 ms ÷ 1000 = 1700000000 s.
Does Excel handle epoch time correctly?
Excel can convert epoch time using the formula =A1/86400+25569 (where A1 contains the epoch seconds), then format the cell as a date. However, Excel does not automatically adjust for timezones; you must add or subtract the offset manually. Also, Excel’s date system has a leap-year bug for dates before 1900, but that doesn’t affect epoch dates.
Can I convert epoch time in the Windows Command Prompt?
Not directly. The Command Prompt has no built-in date arithmetic. You can call PowerShell from cmd using powershell -Command "[DateTimeOffset]::FromUnixTimeSeconds(1700000000).UtcDateTime", or use a batch script with more complex logic.
Is epoch time the same everywhere in the world?
Yes, epoch time is independent of timezone. It is always the same number at the same instant globally. The conversion to a local date/time depends on your timezone offset, but the epoch value itself is universal.
Related
Formula used
in t | Epoch seconds | s | 1700000000 | 0 out dt | UTC date/time | - | t / 86400 + 25569 | 6 out local | Local date/time | - | (t - 0) / 86400 + 25569 + (-timezone_offset_hours / 24) | 6
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.