How to Calculate the Date from a Snowflake ID | Divide an X (Twitter) or Discord ID by 4,194,304 and Add the Epoch, Plus a Table for Dating IDs by Their Digits
“What is the formula for getting the posting time from a post ID?” “I want to work out when a Discord account was created from its ID myself.” “When did IDs reach 19 digits?” IDs on X (formerly Twitter) and Discord are called Snowflake IDs, and the upper part of the 64-bit number holds the time the ID was created, in milliseconds. So dividing the ID by 4,194,304 (2 to the power of 22) and adding each service’s reference time gives you the creation time. This article explains the formula and the bit layout, a worked example using the ID from Discord’s official documentation, what to watch for when calculating in Excel, why the same number gives different dates on different services, a table of the first ID of each year and when IDs gained a digit, how to get the time between two IDs, and how to turn a date back into an ID to narrow searches with since_id and max_id, all with figures checked in the Snowflake ID to Date Converter.
The short answer: date (Unix milliseconds) = ID ÷ 4,194,304 (rounded down) + epoch
For X and Discord Snowflake IDs, dividing the ID by 2 to the power of 22 (4,194,304) and dropping the fraction gives the number of milliseconds since the service’s reference time (its epoch). Adding that epoch as Unix time in milliseconds gives the Unix time at which the ID was created. Convert it to your time zone at the end (Japan time is UTC + 9 hours).
| Service | Divide by | Epoch to add (Unix ms) | Epoch (UTC) |
|---|---|---|---|
| X (formerly Twitter) | 4,194,304 (2^22) | 1288834974657 | November 4, 2010 01:42:54.657 |
| Discord | 4,194,304 (2^22) | 1420070400000 | January 1, 2015 00:00:00.000 |
| Instagram and Threads | 8,388,608 (2^23) | 1314220021721 | August 24, 2011 21:07:01.721 |
| Mastodon | 65,536 (2^16) | 0 | January 1, 1970 (plain Unix time) |
| Example ID | Calculation | Created (UTC) |
|---|---|---|
| 175928847299117063 (Discord) | 41944705796 + 1420070400000 = 1462015105796 | Saturday, April 30, 2016 11:18:25.796 |
| 2000000000000000000 (X) | 476837158203 + 1288834974657 = 1765672132860 | Sunday, December 14, 2025 00:28:52.860 |
Why divide by 4,194,304: what is inside the 64 bits
A Snowflake ID is a 64-bit integer (64 binary digits). From the top down it holds the time, which server created it, and its position within that millisecond. On both X and Discord, the lowest 22 bits are the server and sequence numbers, and the bits above them are the time in milliseconds.
| Service | Time part | Lower part (not used for the date) |
|---|---|---|
| X | Upper 41 bits (milliseconds) | Data center 5, worker 5, sequence 12 bits |
| Discord | Upper 42 bits (milliseconds) | Internal worker 5, process 5, increment 12 bits |
| Instagram and Threads | Upper 41 bits (milliseconds) | Shard 13, sequence 10 bits |
| Mastodon | Upper 48 bits (milliseconds) | Sequence 16 bits |
Cutting off the lowest 22 bits (shifting right by 22 bits) is the same as dividing by 2^22 = 4,194,304 and discarding the fraction, so you can do it on a calculator. Put the other way round, every millisecond the ID grows by 4,194,304: by 4,194,304,000 (about 4.2 billion) per second and 362,387,865,600,000 (about 362 trillion) per day.
- Bigger means newer: for IDs from the same service, the order of the numbers is the order in which they were created.
- The 12-bit sequence: one server can make up to 4,096 IDs in the same millisecond, so IDs never collide even when many posts arrive at once.
- Instagram has 23 lower bits, so divide by 2^23 = 8,388,608; Mastodon has 16, so divide by 65,536. Mastodon’s epoch is January 1, 1970, so the result is already Unix time in milliseconds.
Worked example: Discord’s 175928847299117063 is April 30, 2016 11:18:25.796 UTC
- 1
Divide by 4,194,304 and round down
175928847299117063 ÷ 4,194,304 = 41944705796.03… → 41944705796. That is the number of milliseconds since January 1, 2015 00:00 UTC (about 1 year and 4 months).
- 2
Add the epoch
41944705796 + 1420070400000 = 1462015105796. This is Unix time (milliseconds since January 1, 1970 00:00 UTC).
- 3
Turn it into a date
1462015105796 ms is April 30, 2016 11:18:25.796 (UTC), a Saturday. In Japan time, add 9 hours: April 30, 2016 20:18:25.796.
- 4
Reading the lower 22 bits too
The remainder holds internal worker 1, process 0 and increment 7. They have nothing to do with the date, but the tool shows them alongside it.
As an X example, take 2000000000000000000 (exactly 2 quintillion): ÷ 4,194,304 gives 476837158203 (drop the .125), + 1288834974657 gives 1765672132860, which is December 14, 2025 00:28:52.860 UTC (09:28:52.860 the same day in Japan time). In other words, X IDs passed 2 quintillion at that moment.
Formulas and pitfalls when calculating in Excel or a spreadsheet
With an X ID in cell A1, the following formulas give the date and time in Japan time. Set the number format to “yyyy/mm/dd hh:mm:ss.000” to see the milliseconds. For UTC, leave out +9/24.
- X: =(INT(A1/4194304)+1288834974657)/86400000+DATE(1970,1,1)+9/24
- Discord: =(INT(A1/4194304)+1420070400000)/86400000+DATE(1970,1,1)+9/24
- Instagram media ID: =(INT(A1/8388608)+1314220021721)/86400000+DATE(1970,1,1)+9/24
86400000 is the number of milliseconds in a day, and 9/24 is the 9-hour offset for Japan time. Excel only keeps 15 significant digits, so pasting a 19-digit ID as a number turns its last 4 digits into 0. What gets cut off is less than 10,000, far smaller than one millisecond of time (4,194,304), so the date is off by at most the last digit of the milliseconds. If you want to keep the ID itself, format the cell as text before pasting.
The same number gives different dates on different services, and the number alone can’t tell them apart
IDs from X, Discord and Instagram are all similar 18 to 19 digit numbers, but because the divisor and epoch differ, the same number gives a different date depending on which service you read it for. Here is 175928847299117063 read each way.
| Reading 175928847299117063 as… | Created (UTC) | What the tool does |
|---|---|---|
| a Discord ID | Saturday, April 30, 2016 11:18:25.796 | Listed as a reading |
| an X ID | Saturday, March 3, 2012 13:01:20.453 | Listed as a reading |
| an Instagram media ID | Monday, April 23, 2012 14:46:14.619 | Listed as a reading |
| a Mastodon ID | January 25, 2055 | Hidden because the date is in the future |
Paste only the number into the tool and it lists three readings (X, Discord and Instagram) and hides three that give impossible dates (Mastodon, and Unix time in microseconds or nanoseconds). If you know which service the ID comes from, choose it under “Read it as an ID from”, or paste the whole discord.com/channels/… or x.com/…/status/… URL so that only one reading remains.
Quick table: the first ID of each year, and when IDs reached 19 digits
These are the first IDs created at 00:00 on January 1 of each year, Japan time (15:00 UTC on December 31 of the year before). Any ID larger than this was created after that moment. The leading digits and the number of digits give you a rough year without any calculation.
| Year | First X ID | First Discord ID |
|---|---|---|
| 2016 | 682576944952246272 | 132135675494400000 |
| 2017 | 815210903761846272 | 264769634304000000 |
| 2018 | 947482474705846272 | 397041205248000000 |
| 2019 | 1079754045649846272 | 529312776192000000 |
| 2020 | 1212025616593846272 | 661584347136000000 |
| 2021 | 1344659575403446272 | 794218305945600000 |
| 2022 | 1476931146347446272 | 926489876889600000 |
| 2023 | 1609202717291446272 | 1058761447833600000 |
| 2024 | 1741474288235446272 | 1191033018777600000 |
| 2025 | 1874108247045046272 | 1323666977587200000 |
| 2026 | 2006379817989046272 | 1455938548531200000 |
| 2027 | 2138651388933046272 | 1588210119475200000 |
- X IDs reached 19 digits (1 quintillion) around May 25, 2018 13:05 UTC. Before that they had 18 digits, and until around August 7, 2011 they had 17.
- Discord IDs reached 19 digits around July 22, 2022 11:22 UTC, and 18 digits around October 3, 2015.
- On both X and Discord, IDs grow by roughly 132 to 133 quadrillion a year (about 362 trillion a day × 365 or 366 days), so the first two or three digits tell you the year. X IDs from 2026 run from 2006… to just below 2138…, and Discord IDs from 1455… to just below 1588….
Getting the time between two IDs
For two IDs from the same service, divide each by 4,194,304, round down, and subtract to get the time between them in milliseconds. The epochs cancel out, so you don’t need to add them.
| Discord message ID | ÷ 4,194,304 (rounded down) | Time (UTC) |
|---|---|---|
| 1574756469964923456 | 375451200000 | November 24, 2026 12:00:00.000 |
| 1574757340333213993 | 375451407512 | November 24, 2026 12:03:27.512 |
| Difference | 207512 ms | 3 min 27.512 s |
Dividing the difference between the IDs (870368290537) by 4,194,304 directly gives about 207,511.97 ms, almost the same, but it is off by less than a millisecond because of the differing lower 22 bits. Put the IDs on separate lines in the tool’s “Date from ID or URL” and the gaps line by line appear under “Time between the listed IDs”. It is handy for checking the gap between messages or how far apart two accounts were created.
Turning a date back into an ID: narrowing a period with since_id and max_id
In the other direction, you can work out the first ID created at a given time: ID = (Unix ms of the date − epoch) × 4,194,304. This is the smallest ID within that millisecond, with the lower 22 bits set to 0.
| Date (Japan time) | First X ID | First Discord ID |
|---|---|---|
| November 1, 2026 00:00 | 2116545729131446272 | 1566104459673600000 |
| November 24, 2026 00:00 | 2124880650040246272 | 1574439380582400000 |
| December 1, 2026 00:00 | 2127417365099446272 | 1576976095641600000 |
Typing “keyword since_id:2116545729131446272 max_id:2127417365099446272” into X’s search box narrows the results to posts from November 2026 (Japan time). since_id limits results to posts after that ID and max_id to posts before it. On Discord, passing IDs to the API’s after and before parameters in the same way returns only messages after or before that time.
Other IDs with a time inside: Bluesky, ULID, UUID v7 and ObjectId
| ID | Where the time is | How to get the date |
|---|---|---|
| Instagram and Threads post URLs | The letters after /p/ or /post/ (the shortcode) are the media ID written in base 64 | Turn it back into a number, divide by 8,388,608 and add 1314220021721 |
| Bluesky TID | The last 13 characters of a post URL: 53 bits of microseconds plus a 10-bit clock ID | Turn the base-32 text back into a number and divide by 1,024 to get Unix time in microseconds |
| ULID | The first 10 of its 26 characters (48 bits) | Read as Crockford base 32, it is Unix time in milliseconds |
| UUID v7 | The first 12 hex digits (48 bits) | Turn the hex back into a number to get Unix time in milliseconds |
| UUID v1/v6 | 60 bits | 100-nanosecond intervals since October 15, 1582 |
| MongoDB ObjectId | The first 8 hex digits (32 bits) | Unix time in seconds |
Purely random IDs such as UUID v4 contain no time, so no date can be read from them. X IDs of posts from before November 4, 2010, when X switched to Snowflake, are plain sequential numbers, so calculating them gives no meaningful date. How to convert between UTC and Japan time is explained in UTC vs. JST.
Things to keep in mind
- What you get is the moment the ID was created. That stays true after scheduling or editing; a Discord message keeps its ID when edited, so it still shows the time it was first sent.
- The time comes from the service’s server clocks, so it won’t necessarily match world time to the millisecond. Use it as a guide to order and intervals.
- X IDs have a 41-bit time part, so on paper the time part runs out around July 10, 2080 (UTC). The tool’s “ID from date” doesn’t make IDs for dates after that.
- An ID tells you only the time. It doesn’t tell you who created it or whether the post still exists.
Calculating with the tool
- 1
Paste into “Date from ID or URL”
In “Date from ID or URL” of the Snowflake ID to Date Converter, paste an X post URL, a Discord ID (turn on Developer Mode and right-click → “Copy ID”), or an Instagram, Threads or Bluesky post URL. You can list up to 20, one per line.
- 2
Pick the reading
If you pasted only a number and several readings appear, choose X, Discord or another service under “Read it as an ID from”. The time appears in Japan time, UTC, ISO 8601 and Unix time, with how many years and days ago it was.
- 3
Get an ID from a date
Enter a date and time in “ID from date” to get the “First ID of that moment” in X, Discord, Instagram, Mastodon, Bluesky, ULID, UUID v7 and ObjectId formats. Click to copy it and use it with since_id: and similar.
- 4
See how it works and the tables
The “How it works & tables” tab shows the bit layouts and the “First ID of each year (January 1, 00:00 Japan time)” table.
FAQ
- What is the formula for getting a tweet’s (post’s) time from its ID?
- Date (Unix ms) = ID ÷ 4,194,304 (fraction dropped) + 1288834974657. 1288834974657 is November 4, 2010 01:42:54.657 UTC. For example, 2000000000000000000 gives 476837158203 + 1288834974657 = 1765672132860, which is December 14, 2025 00:28:52.860 UTC.
- How do I calculate the date from a Discord ID?
- Divide the ID by 4,194,304, round down, and add 1420070400000 (January 1, 2015 00:00 UTC) to get Unix time in milliseconds. The documentation example 175928847299117063 gives 41944705796 + 1420070400000 = 1462015105796, which is April 30, 2016 11:18:25.796 UTC.
- Why divide by 4,194,304?
- Because the lowest 22 bits of a Snowflake ID are server numbers and a sequence, and the bits above them are the time in milliseconds. Cutting off the lowest 22 bits is the same as dividing by 2^22 = 4,194,304 and discarding the fraction. Instagram has 23 lower bits, so you divide by 8,388,608.
- When did X post IDs reach 19 digits?
- Around May 25, 2018 13:05 UTC. Discord IDs reached 19 digits around July 22, 2022 11:22 UTC. The first ID of January 1, 2026 00:00 Japan time is 2006379817989046272 on X and 1455938548531200000 on Discord.
- Can I convert a Snowflake ID to a date in Excel?
- =(INT(A1/4194304)+1288834974657)/86400000+DATE(1970,1,1)+9/24 gives the date in Japan time (for Discord add 1420070400000; for UTC drop +9/24). Excel only keeps 15 digits, so the last 4 digits become 0, but that is smaller than one millisecond of time (4,194,304), so the error is at most the last digit of the milliseconds.
- Can I turn a date into an ID and search only posts from that period?
- ID = (Unix ms − epoch) × 4,194,304 gives the first ID of that moment. November 1, 2026 00:00 Japan time is 2116545729131446272 on X and December 1, 00:00 is 2127417365099446272, so “keyword since_id:2116545729131446272 max_id:2127417365099446272” narrows the search to posts from November.
Tools in this article
Related articles
How to Count and Play Polyrhythms: Counting 3 Against 2, 4 Against 3 and 5 Against 4 on Least-Common-Multiple Cells, the Right and Left Hand Order, Intervals in ms by BPM, and How to Practice
When you try to practice 3 against 2 (3 over 2) or 4 against 3 (4 over 3) on drums or piano, it is hard to tell where the right and left hands meet and in what order to play, and one hand keeps getting pulled along by the other. If you divide one cycle into as many cells as the least common multiple of the two numbers and count those, it becomes clear which note lands on which cell. 3 against 2 has 6 cells, with the right hand on 1, 3 and 5 and the left hand on 1 and 4; 4 against 3 has 12 cells, with the right hand on 1, 4, 7 and 10 and the left hand on 1, 5 and 9. This article covers how to count and the order of the hands, a chart of 12 common polyrhythms including 5 against 4 and 7 against 4, how to work out note intervals in ms from the BPM, how 6 against 4 and polymeters differ, a practice order that gets you playing it, and how to read your timing errors, all with numbers calculated by the Polyrhythm Metronome.
Read article →How to Write and Read Roman Numerals: Writing Place by Place, the Subtraction Rule for 4 and 9, Years and Birthday Dates (Tattoos and Engravings), and Common Mistakes Such as IIII and IC
2026 is MMXXVI and 1999 is MCMXCIX. You see Roman numerals in film credits, on clock faces and in anniversary engravings, but the moment you try to write one yourself, you get stuck on questions like “is IIII fine for 4?”, “can I write 99 as IC?” and “where do I split 1988?”. Roman numerals need only seven letters, I, V, X, L, C, D and M, plus four rules. The most reliable method is to split the number into thousands, hundreds, tens and ones, turn each place into Roman numerals and join them. This article covers how to write and read them step by step, a list of common mistakes with the correct forms, a chart of years, the order and checks to use when turning a birthday or wedding date into Roman numerals, how to write 4,000 and above, and what to watch out for with the clock IIII and symbols such as Ⅻ, all using results from the Roman Numeral Converter.
Read article →How to Calculate Opening Hand Probability: Odds of a 3-of or 4-of in Your Opening Hand, the Hypergeometric Distribution by Hand, How Many Copies for 80%, and Combo, Prized-Card and Mulligan Odds
Whether a card will show up in your opening hand can be worked out exactly with a calculation called the hypergeometric distribution. A card with 3 copies in a 40-card deck shows up at least once in a 5-card opening hand 33.76% of the time, and a card with 4 copies in a 60-card deck shows up in a 7-card hand 39.95% of the time. Both are roughly “1 in 3”, which most players find lower than they expected. This article covers the formula and how to work it out on a calculator, why the binomial distribution gives the wrong answer, the chance of exactly x copies and the expected number, quick-reference tables for 40- and 60-card decks, how many copies reach 80%, the odds by turn going first or second, the chance of assembling a two-card combo, and prized-card and mulligan odds, all with figures from the Opening Hand Probability Calculator.
Read article →