Skip to content
Reference Template5 columns · 5 sample rows· Updated

Digital Storage Units & Typography Scales Markdown Table Template

This reference answers two questions that keep coming up in engineering docs: how big is a “megabyte” really, and what is 0.875rem in pixels? The storage half lines up binary (IEC) units, which count in powers of 1024, against decimal (SI) units, which count in powers of 1000. The typography half maps Tailwind font-size classes to their rem values and the pixel sizes they produce at the default 16 px root font size.

Edit This Template

Edit cells, add rows, or sort — the Markdown updates live
Row
1
text-xs (12px = 0.75rem)
2
text-sm (14px = 0.875rem)
3
text-base (16px = 1.0rem)
4
text-xl (20px = 1.25rem)
5
text-2xl (24px = 1.5rem)
Output
| Unit Name             |            Binary (IEC) |            Decimal (SI) |       Exact Bytes (B) | Tailwind / Rem Equivalent   |
| :-------------------- | ----------------------: | ----------------------: | --------------------: | :-------------------------- |
| 1 Kilobyte (kB / KiB) |           1,024 B (KiB) |            1,000 B (kB) |                 1,024 | `text-xs` (12px = 0.75rem)  |
| 1 Megabyte (MB / MiB) |       1,048,576 B (MiB) |        1,000,000 B (MB) |             1,048,576 | `text-sm` (14px = 0.875rem) |
| 1 Gigabyte (GB / GiB) |   1,073,741,824 B (GiB) |    1,000,000,000 B (GB) |         1,073,741,824 | `text-base` (16px = 1.0rem) |
| 1 Terabyte (TB / TiB) |     1,099,511,627,776 B |     1,000,000,000,000 B |     1,099,511,627,776 | `text-xl` (20px = 1.25rem)  |
| 1 Petabyte (PB / PiB) | 1,125,899,906,842,624 B | 1,000,000,000,000,000 B | 1,125,899,906,842,624 | `text-2xl` (24px = 1.5rem)  |
5 rows × 5 columns
Rendered Preview
Unit NameBinary (IEC)Decimal (SI)Exact Bytes (B)Tailwind / Rem Equivalent
1 Kilobyte (kB / KiB)1,024 B (KiB)1,000 B (kB)1,024text-xs (12px = 0.75rem)
1 Megabyte (MB / MiB)1,048,576 B (MiB)1,000,000 B (MB)1,048,576text-sm (14px = 0.875rem)
1 Gigabyte (GB / GiB)1,073,741,824 B (GiB)1,000,000,000 B (GB)1,073,741,824text-base (16px = 1.0rem)
1 Terabyte (TB / TiB)1,099,511,627,776 B1,000,000,000,000 B1,099,511,627,776text-xl (20px = 1.25rem)
1 Petabyte (PB / PiB)1,125,899,906,842,624 B1,000,000,000,000,000 B1,125,899,906,842,624text-2xl (24px = 1.5rem)

When to Use This Table

The storage numbers matter whenever a limit is written down. An upload form that says “10 MB” and a server that enforces 10 MiB disagree by about 486 kilobytes, enough to reject a file the UI promised to accept. Support teams field the same confusion when a “1 TB” disk shows up as 931 GB in the operating system. The rem column serves CSS style guides, where designers specify pixels and the codebase needs rems so text respects the reader’s browser font setting.

Note that the two halves are independent; the Tailwind class in a row has nothing to do with the storage unit in that row, they simply share a five-row grid. A good version of this table is explicit about which convention each number uses, writes symbols correctly (kB for 1000 bytes, KiB for 1024), and gives exact integers rather than rounded ones. If your audience only needs one half, split it into two tables using the variations below.

Formatting This Table in Markdown

A digital storage units & typography scales table puts a few things in cells that Markdown treats as syntax. These are the ones to watch so it renders correctly on GitHub, GitLab, Obsidian and docs sites.

  • Keep units out of right-aligned number cells

    Cells such as 1,024 B (KiB) and 1,099,511,627,776 B end in different suffixes, so right-aligned digits do not line up. Put the unit in the header (Exact Bytes (B), as the last numeric column does) and keep cells to bare digits with thousands separators; see column alignment.

  • Write powers with Unicode superscripts

    GFM leaves 1024^2 and 10^12 untouched, so write 1024² and 10¹² with Unicode superscripts (every digit has one), or 10<sup>12</sup> outside code spans, or $10^{12}$ where math renders. Each form works only in its own context, so match it to the platform.

  • Use ≈ instead of ~ for approximate values

    Some renderers read text between tildes as strikethrough, so ~931 GB and a later ~1 TB in the same cell or paragraph may be struck out. The ≈ character (U+2248) has no Markdown meaning, and neither do × and =.

  • Commas make byte counts hard to paste

    Thousands separators make 1,048,576 readable, but a comma-formatted value does not parse as one number in code, and in a CSV export it splits into three fields unless quoted. If readers copy byte counts into config or tests, add a plain-digits column.

What Goes in Each Column

ColumnAlignmentWhat to put here
Unit Nameleft :---The unit family with both symbols, such as “Megabyte (MB / MiB)”. Left-aligned as a label. Mention the full IEC name (kibibyte, mebibyte) somewhere on the page, because people search for it when a tool shows MiB.
Binary (IEC)right ---:The value in bytes of one binary unit, 1024 raised to the unit’s power, with thousands separators and the KiB/MiB symbol. Right-aligned so the digit groups line up and the growth of each step is visible at a glance.
Decimal (SI)right ---:The decimal equivalent, 1000 raised to the same power. Use the SI symbols exactly: lowercase kB for kilobyte, uppercase MB, GB, TB, PB. Right-aligned for the same reason as the binary column.
Exact Bytes (B)right ---:The full integer for the binary unit, with no rounding and no scientific notation. Engineers copy these into config files and tests, so a value like 1,073,741,824 must be exact; consider adding the power of two (2³⁰) for clarity.
Tailwind / Rem Equivalentleft :---A Tailwind text-size class in a code span, its pixel size at a 16 px root, and the rem value — for example text-sm (14px = 0.875rem). Left-aligned because each cell mixes code and prose.

How to Fill It In

  1. 1Generate the byte values rather than typing them. A one-line script (1024 ** n and 1000 ** n for n = 1…5) gives exact integers; formatting them with a locale-aware number formatter adds separators without mistakes.
  2. 2Decide which convention your product uses for limits and say so in a sentence above the table. Then check the actual enforcement code: many servers, including nginx’s client_max_body_size, read 10m as 10 × 1024 × 1024 bytes.
  3. 3Pull the typography values from your own Tailwind theme, not from memory. In Tailwind v4 the defaults live as --text-* CSS variables; if your project overrides them, the table must show your overrides.
  4. 4Convert rem to pixels by multiplying by 16 only if your root font size is the browser default. If your CSS sets html { font-size: 62.5% } or similar, use that base and state it in the table caption.
  5. 5Spot-check each row against one real tool: ls -lh or Windows Explorer for binary sizes, macOS Finder for decimal, and your browser’s computed styles panel for the font sizes.

Ready-to-Paste Variations

How far apart binary and decimal units drift

The gap grows with each prefix. This is the table to show when someone asks why their new disk looks smaller than advertised.

| Prefix pair | Binary (bytes) | Decimal (bytes) | Binary is larger by |
| :--- | ---: | ---: | ---: |
| KiB vs kB | 1,024 | 1,000 | 2.40% |
| MiB vs MB | 1,048,576 | 1,000,000 | 4.86% |
| GiB vs GB | 1,073,741,824 | 1,000,000,000 | 7.37% |
| TiB vs TB | 1,099,511,627,776 | 1,000,000,000,000 | 9.95% |
| PiB vs PB | 1,125,899,906,842,624 | 1,000,000,000,000,000 | 12.59% |

Tailwind font-size scale, px to rem

Typography only, at the default 16 px root. These are Tailwind’s default theme values; replace them if your theme customises the scale.

| Class | Pixels | Rem |
| :--- | ---: | ---: |
| `text-xs` | 12 | 0.75 |
| `text-sm` | 14 | 0.875 |
| `text-base` | 16 | 1 |
| `text-lg` | 18 | 1.125 |
| `text-xl` | 20 | 1.25 |
| `text-2xl` | 24 | 1.5 |
| `text-3xl` | 30 | 1.875 |

Which tools count in 1000 and which in 1024

A practical lookup for support docs. The same file shows different numbers depending on where you look.

| Where the number appears | Base | Label shown |
| :--- | :---: | :--- |
| Drive packaging and spec sheets | 1000 | GB, TB |
| macOS Finder | 1000 | KB, MB, GB |
| Windows File Explorer | 1024 | KB, MB, GB |
| `ls -lh` (GNU coreutils) | 1024 | K, M, G |
| `ls -lh --si` (GNU coreutils) | 1000 | k, M, G |
| Network speeds (Mbps) | 1000 | bits, not bytes |

Common Mistakes

  • Writing “1 KB = 1024 bytes” without qualification.

    Under SI, kB is 1000 bytes; the 1024-byte unit is KiB. If your audience expects the older memory convention, say “KB (1024 bytes)” explicitly rather than relying on the reader to guess.

  • Documenting a file limit in MB while the server checks MiB, or the reverse.

    Find the line of code or config that enforces the limit, compute the exact byte count, and print that count in the docs. Then the UI copy, the API docs, and the server all agree.

  • Confusing bytes and bits when describing transfer times.

    Network speeds are quoted in bits per second with decimal prefixes. Divide Mbps by 8 to get megabytes per second (decimal) before estimating how long a 500 MB upload takes.

  • Hard-coding font sizes in px because the table lists pixels.

    Pixels are in the table for designers. In CSS use the rem value or the Tailwind class, so text scales when a reader raises the default font size in browser settings.

Browse all 50 templates
FAQ

Digital Storage Units & Typography Scales: Frequently Asked Questions

Why does my 1 TB drive show about 931 GB?

The manufacturer counts 1 TB as 10¹² bytes. Windows divides by 1024³ but labels the result “GB”, so 10¹² ÷ 1,073,741,824 ≈ 931. Nothing is missing; the two numbers use different units with the same name.

Is RAM measured in binary or decimal units?

Memory modules come in powers of two, so “16 GB” of RAM is in practice 16 GiB (17,179,869,184 bytes). The JEDEC memory standards kept the KB/MB/GB labels for these binary sizes, which is why the ambiguity persists.

What is 1rem in pixels?

One rem equals the root element’s font size. Browsers default to 16 px, so 1rem is 16 px unless your CSS or the user’s browser settings change the root size. That user control is the main reason to prefer rem for text.

Should documentation use KiB/MiB or KB/MB?

Use the IEC symbols when the exact byte count matters — limits, quotas, buffer sizes. For rough sizes in user-facing copy, decimal units are what most people expect. Whichever you choose, state the convention once near the top.