Human-readable units

Convert milliseconds and bytes into readable units.

The interactive form is ready when JavaScript is enabled.

How to use

Enter a number and say what it is: milliseconds or bytes. A duration in milliseconds is shown in seconds, minutes, hours and days; a byte count is shown in KB, MB and GB and in KiB, MiB and GiB. Results are shown with up to six decimal places.

Sizes follow two conventions that disagree. Decimal units step by 1000 (1 MB = 1,000,000 bytes) and are what drive manufacturers and network operators quote; binary units step by 1024 (1 MiB = 1,048,576 bytes) and are what Windows and many programs display, often still labelled MB or GB. The gap is about 2% at kilobytes, 5% at megabytes and 7% at gigabytes, and it widens with every step.

Durations are converted with fixed lengths: 1,000 milliseconds in a second, 60 seconds in a minute, 3,600 in an hour and 86,400 in a day. That suits timeouts, logs and benchmarks; calendar periods such as months are not converted, because their length varies.

The conversion runs in one direction, from the raw number to readable units. To go the other way, multiply: 2.5 GB is 2,500,000,000 bytes, and 2.5 GiB is 2.5 × 1,073,741,824 = 2,684,354,560 bytes.

Example

1,048,576 bytes equals 1 MiB. MB uses powers of 1,000; MiB uses powers of 1,024, so those values differ.

  • 1048576 bytes1,048.576 KB and 1.048576 MB decimal, or exactly 1,024 KiB and 1 MiB binary.
  • 90000 ms90 seconds, 1.5 minutes, 0.025 hours.
  • 86400000 ms86,400 seconds, 1,440 minutes, 24 hours: exactly 1 day.
  • 1000000000000 bytes1,000 GB, or about 931.32 GiB: a 1 TB drive as the operating system sees it.

Frequently asked questions

Why does my 1 TB drive show as 931 GB?

The manufacturer counted decimal terabytes and the operating system is showing binary units while labelling them GB. Nothing is missing: the two are counting in steps of 1000 and 1024.

Which convention should I use?

Whichever the other side uses: storage and bandwidth are quoted decimally, memory and Windows binary. Writing MiB when you mean 1024 removes the ambiguity entirely.

Can I convert seconds or minutes?

Enter them in milliseconds: multiply seconds by 1,000. 45 seconds is 45000 ms.

Why is a value shown as 0?

Because results are rounded to six decimal places. A small byte count in GB, for example 100 bytes, rounds to 0; read it in a smaller unit instead.

Related tools