GiB vs GB: what is the difference?
A GiB (gibibyte) is 1,073,741,824 bytes, 2 to the 30th; a GB (gigabyte) is 1,000,000,000 bytes, so a GiB is about 7.4% larger.
Runtime prices memory per GiB and says so: $0.0075 per reserved GiB-hour,
where a GiB is 1,073,741,824 bytes, not a decimal GB (pricing).
A 4 GiB sandbox is 4,096 MiB of memory, and that is what memoryMiB: 4096
asks for.
Why it matters when you compare prices
Cloud price lists mix the two units, and a rate per GB and a rate per GiB are not the same rate. Sandbox providers are no exception: some quote memory per GiB-hour, others per GB-hour, and a "4 GB" machine may hold either 4 billion bytes or 4 GiB. A per-GB price looks about 7% cheaper than the same money per GiB. Before comparing two rates, put them in one unit.
The difference grows with the prefix. A KiB is 2.4% larger than a kB, a MiB 4.9% larger than an MB, a GiB 7.4% larger than a GB and a TiB 10.0% larger than a TB.
The units in facts
| Unit | Bytes | Defined as |
|---|---|---|
| GB, gigabyte | 1,000,000,000 | 10^9, an SI decimal prefix |
| GiB, gibibyte | 1,073,741,824 | 2^30, an IEC binary prefix |
| MiB, mebibyte | 1,048,576 | 2^20; 1,024 MiB make 1 GiB |
| KiB, kibibyte | 1,024 | 2^10 |
| Adopted | December 1998 | The IEC approved the binary prefixes as a standard |
NIST notes that the binary prefixes are not part of the SI, and that "kilo" used to mean 1,024 in computing, which caused the confusion the IEC prefixes were made to end.
Which unit Runtime uses where
| What | Unit | Rate or limit |
|---|---|---|
| Memory | GiB | $0.0075 per GiB-hour while running |
| Sizes in the API | MiB | memoryMiB and diskMiB, default 4096 each |
| Paused storage, snapshots | Decimal GB | $0.08 per GB per 30-day month |
| Snapshots, per hour | GiB | 119 microdollars per GiB-hour, the same rate |
| Volumes | GiB | 153 microdollars per GiB-hour |
| Command output in JSON | KiB | At most 64 KiB (65,536 bytes) each of stdout, stderr |
The snapshot line shows the conversion at work. $0.08 per decimal GB for a 720-hour month, times 1.073741824 GB per GiB, is $0.0001193 per GiB-hour, which the price list rounds down to 119 microdollars (snapshots, images and volumes).
Convert in code
TypeScriptconst GIB = 2 ** 30;const GB = 1e9;const perGbHour = 0.0212; // a price quoted per GB-hourconsole.log((perGbHour * GIB) / GB); // 0.02276..., the same price per GiB-hourPythonGIB, GB = 2**30, 10**9per_gb_hour = 0.0212 # a price quoted per GB-hourprint(per_gb_hour * GIB / GB) # 0.02276..., the same price per GiB-hourThe example rate is Vercel Sandbox's published memory rate in iad1, $0.0212
per provisioned GB-hour, checked 23 September 2026
(published rate comparison).
Related
Sources
- NIST: prefixes for binary multiples, read 25 September 2026
Facts on this page were checked on 25 September 2026.