When software hands you microseconds
Programming languages and databases often store times with microsecond resolution. Python's datetime and timedelta types work in microseconds, many SQL timestamp columns keep six fractional digits, and system monitors report uptime or elapsed time as a large integer of microseconds. People read those numbers badly. A value like 345,600,000,000 means little until it becomes four days. This page does that conversion. It is meant for the moment when a log line, an export or a status screen gives you a long integer and you want a duration in the unit a person thinks in, without opening a spreadsheet.
The factor from 86,400 seconds
A day here is 86,400 seconds, which is 24 hours of 3,600 seconds. A second is 1,000,000 µs, so a day is 86,400 × 1,000,000 = 86,400,000,000 µs, or 8.64 × 10^10 µs. The reciprocal is 1.15740740741e-11 days per microsecond. The page computes days = µs × 1.15740740741e-11. The default 10 µs gives about 1.1574e-10 days. The day in this definition is a fixed length, so it matches the SI second-based convention, with the day itself being a non-SI unit accepted for use with the SI. Every conversion on this page follows from those whole numbers.
Reading a long duration
Take a job that reports 345,600,000,000 µs of elapsed time. Dividing by 8.64 × 10^10 gives 4 days. A trace that spans 1,000,000,000,000 µs, one trillion, is about 11.574 days. A counter at 150,000,000,000 µs is about 1.736 days, which is 41 hours and 40 minutes. A quick way to estimate without a tool is to remember that 10^11 µs is a little over a day, about 1.157 days. If you see a duration of several times 10^11 µs, it is a few days. A value of 10^12 µs is around eleven and a half days. These anchors catch most transcription errors, such as a missing zero.
Device uptime and logs
Embedded boards and servers often keep a monotonic counter in microseconds since boot. A device reporting 520,000,000,000 µs has been running for about 6.019 days. A weekly maintenance rule that says reboot after 7 days corresponds to 604,800,000,000 µs, so the device is under that limit. Converting the counter to days helps compare with alert thresholds that operators write in days. Because monotonic counters ignore time zone and clock changes, they are good for durations, but they cannot tell you the calendar date. Keep a note of when the counter started if you need to map the number to a real date, and convert it with the date tools that your system provides.
Calendar days differ from 86,400-second days
This page uses a day of exactly 86,400 seconds. A calendar day in a region with daylight saving time can last 23 or 25 hours twice a year, and a day that includes a leap second contains 86,401 seconds. Duration calculations in code usually count seconds, not calendar days, so the page agrees with a timedelta or a difference of two monotonic readings. If you need to know how many calendar days lie between two dates, use a date library with time zone rules instead. The result of this page is a duration in units of 24 hours, which is the right thing to report for run times, uptime and elapsed time.
How large a microsecond count can get before precision suffers
A double-precision floating-point number represents integers exactly up to 2^53, about 9.007 × 10^15. As a count of microseconds, that is about 104,250 days, or roughly 285 years, so a microsecond timestamp for any modern date stays exact in a double. JavaScript uses a double for every number, which is why microsecond values from a database survive a trip through a script when they stay below that limit. A 32-bit signed integer, with a maximum of about 2.147 × 10^9, holds only 35.8 minutes of microseconds, which is why 32-bit counters wrap quickly. The page itself works in floating point, and its answer is accurate to many more digits than any real measurement.
Spreadsheet date fractions
Spreadsheets store dates as a count of days, with the fraction of a day representing the time. One microsecond is 1.1574 × 10^-11 of a day, which is the number this page returns for 1 µs. A spreadsheet cell holds about 15 significant digits, and a date serial in the tens of thousands leaves room for roughly a microsecond of resolution, so the last digit of a microsecond stamp may be lost. For sub-millisecond work, keep timestamps as integers in a separate column and convert durations as differences instead of converting absolute times. The page makes it easy to check a difference quickly before you build a formula around it.
From days back to microseconds
Select days as the source and microseconds as the target to multiply by 8.64 × 10^10. One day becomes 86,400,000,000 µs, half a day becomes 43,200,000,000 µs and seven days become 604,800,000,000 µs. Use this when you set a timeout, a retention window or a sleep interval in a system that takes microseconds. A 3-day window is 259,200,000,000 µs, which fits in a 64-bit integer with room to spare but overflows a 32-bit one. Writing the value with the unit in a variable name, such as retention_us, keeps the next reader from guessing. The same habit helps in configuration files, where a bare number such as 259200000000 gives no hint about its unit and can be mistaken for milliseconds or nanoseconds.
Durations versus timestamps in logs
The page changes the unit of a duration. It does not know calendar rules, time zones, leap seconds or the epoch of a timestamp, so it cannot turn an absolute timestamp into a date. It also does not check whether a counter has wrapped around, which can happen with short integers. A result is only meaningful if the source number was a duration in microseconds to begin with. If your value comes from a system that stores nanoseconds or milliseconds, convert it with the matching page first so that the factor in your head and the unit in your data agree. When you report a duration, write it with its unit and the number of days to a sensible precision, for example 6.02 days, because the long integer is useful to a program and a poor way to tell another person how long something ran. Keep the original integer in the raw log.