Where microseconds meet days
Microseconds are a common timestamp resolution. Python's datetime and timedelta store microseconds, PostgreSQL timestamps resolve to one microsecond, and many tracing and profiling tools log events at that scale. Days are how people state retention periods, timeouts and expiry. Programmers therefore convert between the two when they set a retention window, check an interval in a log or compare two timestamps taken days apart. The page performs the multiplication and returns the integer or decimal microsecond count. It treats a day as a fixed 24-hour span and does not handle calendar dates or time zones, which are separate concerns in date libraries. A retention rule of 14 days becomes 1,209,600,000,000 microseconds, a number worth generating rather than typing.
From 86,400 seconds to microseconds
One day is 24 hours of 3,600 seconds, so 86,400 seconds. The SI prefix micro means one millionth, so there are 1,000,000 microseconds in a second, as defined in the SI Brochure. Multiplying gives 86,400 × 1,000,000 = 86,400,000,000, or 8.64 × 10¹⁰ microseconds per day. The page uses that constant. A short way to remember it is that a day is 86.4 billion microseconds. If you read a figure of 86,400,000 you are looking at milliseconds, and 86,400 means seconds, so the digit count is a quick sanity check on the unit.
Ten days as 864 billion microseconds
Entering 10 days returns 864,000,000,000 microseconds, which is 8.64 × 10¹¹. The number has twelve digits, longer than most people want to read, so programs print it in scientific notation or in a smaller unit. The default is a good reminder of scale. A run of ten days contains almost a trillion microseconds, and any counter that holds microseconds therefore needs a wide integer type to cover multi-day spans. A 32-bit signed integer tops out near 2.1 billion, which is only about 36 minutes of microseconds, so such counters overflow quickly. Dividing the result by 86,400,000,000 returns the 10 days.
Other spans worked out
Half a day, 0.5, is 43,200,000,000 µs. A quarter of a day, 0.25 or six hours, is 21,600,000,000 µs, and a single day is 86,400,000,000 µs. A week of 7 days is 604,800,000,000 µs. To go back, divide microseconds by 86,400,000,000, so 43,200,000,000 µs is 0.5 days. These examples show the order of magnitude of retention settings when a system accepts microseconds. For a 30-day retention that is 2,592,000,000,000 µs. When configuring a system, confirm the unit it expects, because an extra or missing factor of 1,000 turns a month into a few minutes or a few decades. Ten days, the default, is 864,000,000,000 µs, and one hour is 3,600,000,000 µs.
Why 64-bit counters matter
A signed 64-bit integer holds up to 9,223,372,036,854,775,807, so it can store about 106 million days of microseconds, which is far beyond any practical range. A double-precision floating-point number represents integers exactly only up to 2⁵³, about 9.007 × 10¹⁵, and that limit equals roughly 104,250 days of microseconds, close to 285 years. Time values within that span are safe in a double, but adding a small interval to a very large microsecond count may lose the last digits. Use integer types for exact microsecond arithmetic, and use the page to estimate how large the count will become. A signed 64-bit microsecond count spans about 292,000 years either side of its epoch.
Timestamps, epochs and rounding
A microsecond timestamp is usually the number of microseconds since an epoch, such as 1970-01-01 00:00:00 UTC for the Unix epoch. Converting days to microseconds gives a duration, not a point in time, and adding it to a timestamp gives a later timestamp. Systems that apply leap seconds or time zones may differ from the fixed-day result by an hour or a second when the interval spans such an event. Round only at the end. A calculation in microseconds is exact in integers, and rounding the final value to seconds or days for display is a presentation choice. A Unix timestamp from late 2023 is near 1.7 × 10¹⁵ microseconds, about 19,676 days after 1970, so a day count and a microsecond count differ by the factor on this page. Keep the unit in the field name, such as retention_us, so that the scale is clear to anyone reading the schema later.
Comparing with milliseconds and nanoseconds
Microseconds sit between milliseconds and nanoseconds. A day is 86,400,000 ms, 86,400,000,000 µs and 86,400,000,000,000 ns, and each step is a factor of 1,000. Moving the decimal point three places gets from one to the next. Different platforms favor different units. Java and JavaScript timestamps default to milliseconds, Python datetime and PostgreSQL to microseconds, and Go and many system clocks to nanoseconds. When passing a value between systems, check the unit, because a day written in the wrong one produces a value off by a thousandfold, and the error rarely raises an exception. The default ten days is 864,000,000 ms or 864,000,000,000,000 ns in the neighboring units.
Database timestamps and latency logs
Microsecond values appear in database timestamps and performance logs. PostgreSQL stores timestamps with microsecond resolution, and many tracing tools report latency in microseconds. A web request that takes 250,000 microseconds lasts a quarter of a second, and a 30-day retention rule is a window of 2,592,000,000,000 microseconds when a query compares raw values. A day contains 86.4 billion of them. Scales like these explain why microsecond timestamps suit event ordering in networks and logs, while days suit planning and retention. The page links the two by multiplication and does not model clock accuracy or synchronization error between servers.
Fixed-day assumption and storage limits
The conversion is a multiplication by a defined constant, so it has no uncertainty of its own. It assumes a fixed 24-hour day, ignores leap seconds and daylight saving, and does not parse dates or handle time zones. It does not say whether a given system will store the value without overflow or rounding, and it does not check clock accuracy. Use it for durations, and use a date-time library for anything tied to a calendar. If your result differs from another tool, check whether that tool counted calendar days or a different unit. Treat any figure in microseconds as a duration measured on one clock. Two machines that each count the same day can disagree by milliseconds or more unless they are synchronized.