Container CPU and memory unit converter
Make the units in your deployment configuration explicit. Compare decimal and binary memory, then divide CPU quota by period. Free, no login, and calculated only in your browser.
Memory units
| Unit | Amount |
|---|---|
| bytes | 1073741824 |
| kB | 1073741.824 |
| MB | 1073.741824 |
| GB | 1.073741824 |
| KiB | 1048576 |
| MiB | 1024 |
| GiB | 1 |
Zero is a mathematical amount, not a recommendation for a runtime limit.
CPU quota / period
CPU equivalent
50000 µs quota / 100000 µs period = 1/2 CPU = 0.5 CPU
A CPU equivalent is a share of CPU time. It does not reserve a physical core or measure current usage. Repeating decimals are truncated and marked approximate; the fraction stays exact.
MB and MiB are different amounts
Here, kB, MB and GB use powers of 1000. KiB, MiB and GiB use powers of 1024. So 1 GiB = 1073741824 bytes = 1024 MiB = 1.073741824 GB. In comparison, 1 GB is exactly 1000000000 bytes.
Use these explicit unit names when comparing documentation or dashboards. Lowercase mb,
gb and bit units are not accepted. This calculator does not parse Docker suffixes such as
m or generate a configuration from them.
Read a Docker limit without guessing
On Linux, Docker Compose’s cpu_quota and cpu_period describe CFS CPU time. For
example, a quota of 50000 µs in a 100000 µs period gives
50000 / 100000 = 0.5 CPU. CPU shares are relative weights, not guaranteed cores.
For an explicit memory example, mem_limit: "1073741824" expresses 1 GiB in bytes.
Compose’s mem_limit and deploy.resources.limits.memory must agree when both are
set. Check the
Docker Compose service reference
for your platform and supported configuration.
Configured limits are not observed usage
A configured memory cap is not the amount an application currently uses. A CPU quota limits time over a period; it is not a utilization reading, host capacity check or sizing recommendation. This tool does not connect to a container, read metrics, validate a Docker host or change limits.
Your entries stay in this page’s memory. They are not saved, added to URLs, logged, tracked or sent over the network. Copy only transfers the calculated numeric result when you request it.