By EnginStack Engineering Team | Verified by engineers, built on NIST metrology standards About →
GB
1,024.0000 MB
1 GB = 1,024 MB 1 MB = 0.0009766 GB

Constants verified against NIST Special Publication 811 (Guide for the Use of the International System of Units) and the 1959 International Yard and Pound Agreement. All values are exact — none are rounded approximations.

The Conversion That Bills You Every Month

Gigabytes to megabytes. It sounds like a straightforward multiplication — and mathematically, it is. Multiply by 1024. Done. But in the cloud computing economy, this conversion is a pricing function. AWS Lambda, the serverless platform that powers a significant chunk of the modern internet, bills compute time in GB-seconds and provisions memory in MB. A function configured at 1,024 MB costs exactly the same as one configured at 1 GB. Configure it at 1,025 MB and you've crossed into a new pricing tier, paying for 2 GB of allocated memory bandwidth. That single megabyte — the gap between binary 1,024 and decimal 1,000 — is the most expensive byte in the cloud.

Mobile carriers exploit the same ambiguity in the opposite direction. A "5 GB" data plan from AT&T or Verizon typically means 5,000 MB (decimal), not 5,120 MB (binary). Over a month of streaming, that missing 120 MB is half an hour of Spotify. Over a year, it's six hours. Multiply by 100 million subscribers and you're looking at billions of phantom megabytes — capacity that was sold but never delivered.

The Arithmetic (Not the Confusing Part)

MB = GB × 1024

Under the binary convention, every step up the data ladder multiplies by 1024. 1 GB = 1,024 MB = 1,048,576 KB = 1,073,741,824 bytes. Under decimal (SI), it's simply 1,000, 1,000,000, and 1,000,000,000. The formula itself is trivial. The context — which convention applies to your specific situation — is where every mistake lives.

When 4 GB ≠ 4,096 MB

A Docker container started with --memory=4g gets 4,000 MB of RAM. The same container started with --memory=4Gi or --memory=4096m gets 4,096 MB — 96 MB more. In Kubernetes, resources.limits.memory: 4Gi explicitly means binary gibibytes (4 × 1,024³ bytes), while 4G without the "i" means decimal gigabytes. The difference between those two values is about 280 MB — enough to crash a JVM process that was sized for the larger allocation. DevOps engineers learn to spot the missing "i" the way machinists learn to spot a missing decimal point on a tolerance callout.

Windows has used binary counting for file sizes since the 1980s, labeling them "GB" despite technically measuring in GiB. macOS switched to decimal in Snow Leopard (2009), so the same 1 TB hard drive reports as 1 TB in Finder but 931 GB in Windows Explorer. Both numbers are true — they're just using different definitions of "gigabyte."

Why the Binary Gap Compounds

At kilobyte scale: 1 KB (decimal) = 1,000 bytes vs 1 KiB (binary) = 1,024 bytes — 2.4% gap

At megabyte scale: 1 MB = 1,000² vs 1 MiB = 1,024² — 4.9% gap

At gigabyte scale: 1 GB = 1,000³ vs 1 GiB = 1,024³ — 7.4% gap

At terabyte scale: 1 TB = 1,000⁴ vs 1 TiB = 1,024⁴ — 10.0% gap

This is why your 1 TB SSD shows 931 GB in Windows but 1 TB on the box. Western Digital, Seagate, and every other drive manufacturer use decimal. Your operating system uses whichever convention its developers chose. The class-action lawsuits over this were settled — the customer lost. The IEC created binary prefixes (kibi, mebi, gibi, tebi) in 1998 to fix this. Almost nobody adopted them outside of technical specifications.

Frequently Asked Questions

How many megabytes are in a gigabyte for mobile data plans?

Most mobile carriers worldwide use decimal gigabytes: 1 GB = 1,000 MB. A 5 GB plan gives you 5,000 MB of data. Some prepaid and regional carriers use binary, in which case 5 GB = 5,120 MB. The difference — 120 MB — is about 30 minutes of standard-definition video streaming. Always verify in your carrier's fine print: if they advertise "GB" but meter usage in "MB," the convention determines whether you get 1,000 or 1,024 MB per advertised GB.

Does 1 GB always equal 1024 MB in programming?

No, and this is a common source of bugs. Programming languages are inconsistent: Python's humanize library defaults to binary but offers both; Java's File.length() returns bytes and leaves interpretation to you; Go's standard library uses powers of 1024. The safest practice is to never assume — always check whether your framework, cloud provider, or database uses binary or decimal for memory and storage limits. Kubernetes' explicit "Gi" (binary) vs "G" (decimal) distinction was created precisely to eliminate this ambiguity.

Why does my 1 TB external hard drive show as 931 GB?

Because the manufacturer uses decimal terabytes (1 TB = 1,000,000,000,000 bytes) while your operating system uses binary (1 GB = 1,073,741,824 bytes). 1,000,000,000,000 ÷ 1,073,741,824 ≈ 931. The drive hasn't lost any space — the two numbers are simply measuring the same byte count with different rulers. This discrepancy affects all storage media: SSDs, HDDs, USB drives, and SD cards. The only storage medium immune to this confusion is RAM, which is inherently binary-addressed and always uses powers of 1024 despite being labeled in "GB."

More: mb to gb · gb to tb · gb to kb · tb to gb · Guide