{"id":50,"date":"2026-10-09T16:40:00","date_gmt":"2026-10-09T16:40:00","guid":{"rendered":"https:\/\/tothepowerof2.com\/blog\/?p=50"},"modified":"2026-10-07T02:56:46","modified_gmt":"2026-10-07T02:56:46","slug":"kb-vs-kib-file-size-discrepancies","status":"publish","type":"post","link":"https:\/\/tothepowerof2.com\/blog\/kb-vs-kib-file-size-discrepancies\/","title":{"rendered":"Confusing KB with KiB: File Size Discrepancies Explained"},"content":{"rendered":"<p><strong>TL;DR \/ Summary:<\/strong> File sizes that &#8220;do not add up&#8221; usually mix decimal KB (1000 bytes) with binary KiB (1024 bytes) or confuse bits with bytes. Normalize to one system before comparing totals. Confirm power-of-two byte counts with <a href=\"https:\/\/tothepowerof2.com\/\">our free power of 2 calculator<\/a>.<\/p>\n<h2>Symptom: missing gigabytes<\/h2>\n<p>A 500 GB drive reports 465 GB free in OS. Users suspect failure; actually 500 \u00d7 10^9 \/ 2^30 \u2248 465.66 GiB\u2014expected conversion, not lost sectors (excluding formatting overhead separately).<\/p>\n<h2>Symptom: upload size mismatch<\/h2>\n<p>Host limits &#8220;10 MB&#8221; upload as 10 \u00d7 1000 \u00d7 1000 bytes while local script counts 10 \u00d7 1024 \u00d7 1024. File at 10,485,760 bytes exceeds decimal 10 MB cap by 4.86%. Read API docs for which base.<\/p>\n<h3>Symptom: bandwidth versus size<\/h3>\n<p>Download speed 100 Mbps (decimal megabits) divides by 8 for bytes, then divides file bytes\u2014mixing three conventions if file labeled in MiB. Build spreadsheet with explicit columns: bits, decimal bytes, binary bytes.<\/p>\n<h2>Diagnostic steps<\/h2>\n<ul>\n<li>Identify unit label: KB vs KiB vs kb (kilobit!).<\/li>\n<li>Convert everything to raw byte integers.<\/li>\n<li>Compare sums in same base.<\/li>\n<li>Account filesystem block size (often 4096 = 2^12 bytes) rounding file allocation up.<\/li>\n<\/ul>\n<h2>Tools reporting differently<\/h2>\n<p>Windows Explorer historically labeled GiB as GB. Linux du -h uses 1024. Cloud S3 bills decimal GB-month. Git objects measure bytes exactly\u2014no prefix games. npm package size badges vary by script.<\/p>\n<h2>Fix for developers<\/h2>\n<p>Display both units in UI for transparency: &#8220;1.0 MB (1,048,576 bytes).&#8221; Use IEC labels in internal metrics. Document API limits in bytes integer to avoid ambiguity.<\/p>\n<h2>Quick conversion formulas<\/h2>\n<p>Binary bytes = decimal bytes \u00d7 1000 \/ 1024 per &#8220;kilo&#8221; step (approximate per step). Exact: multiply decimal GB by 10^9 \/ 2^30 for GiB. For repeated steps, raise conversion factors to power of number of prefixes (k, M, G).<\/p>\n<p>When exponent math gets messy, compute 2^30 once exactly: <a href=\"https:\/\/tothepowerof2.com\/\">use our free power of 2 calculator<\/a> and store constant in code comments.<\/p>\n<h2>Network versus storage<\/h2>\n<p>1 Gbps link \u2260 1 GiB\/s. 1 Gbps = 10^9 bits\/s \u2248 119.2 MiB\/s theoretical max. Real-world less\u2014 but order-of-magnitude checks prevent expecting 1 GB file in 1 second on &#8220;gigabit&#8221; line without math.<\/p>\n<h2>Support script for users<\/h2>\n<p>Explain: manufacturers count decimal; operating systems count binary. Provide calculator link and table. Reduces refund requests on &#8220;missing&#8221; terabytes.<\/p>\n<h2>Backup and sync tools<\/h2>\n<p>Cloud sync clients reporting &#8220;10 GB uploaded&#8221; may count decimal while local du -sh reports binary GiB\u2014progress bars stall visually near 93% when bases differ though transfer complete. UX writers should footnote unit in tooltip.<\/p>\n<h2>Compression ratio reporting<\/h2>\n<p>Compression tools quote &#8220;50% reduction&#8221; on decimal-labeled files while internal buffers use 2^n block sizes\u2014support tickets alleging wrong compression often need unit normalization not algorithm fix.<\/p>\n<h2>Enterprise monitoring dashboards<\/h2>\n<p>Grafana panels mixing prometheus metrics (often decimal SI) with node_exporter disk (binary) on same chart without axis labels confuse SRE oncall. Standardize one base per dashboard row; annotate conversion in panel description referencing 2^30 versus 10^9 explicitly.<\/p>\n<h2>Photography and creative pro workflows<\/h2>\n<p>Photographers archiving RAW batches estimate storage with decimal TB drives but Lightroom internal cache counts binary\u2014project managers planning 500 GB shoot need both numbers in spreadsheet row to avoid stopping session early when card fills at 465 GiB effective.<\/p>\n<p>Video editors rendering ProRes at roughly 2^30 bytes per minute order-of-magnitude still multiply decimal duration minutes\u2014hybrid math errors cause overnight render jobs missing deadline by one misunderstood prefix.<\/p>\n<h2>Customer support macro<\/h2>\n<p>Pre-write empathetic reply explaining decimal versus binary with analogy: kilometers versus miles\u2014 different units, same road. Link authoritative blog section anchor; reduce handle time and escalation to engineering.<\/p>\n<p>Measure ticket volume before and after macro\u2014 leadership funds documentation when data proves ROI in support hours saved monthly.<\/p>\n<h2>Legal discovery exports<\/h2>\n<p>Litigation support vendors quote collection size decimal; e-discovery platform indexes binary\u2014discrepancy triggers opposing counsel accusation of spoliation until units clarified in meet-and-confer.<\/p>\n<h2>Release notes clarity<\/h2>\n<p>When shipping app update, state install size in both MiB and decimal MB footnote\u2014transparency reduces one-star reviews claiming false advertising when users compare to last phone model reporting differently.<\/p>\n<h2>DevOps runbook snippet<\/h2>\n<p>Include conversion table in on-call runbook appendix for disk-full alerts\u2014engineer at 2 AM compares df output to vendor ticket without re-deriving 2^30 arithmetic under incident stress.<\/p>\n<h2>Inventory spreadsheet column<\/h2>\n<p>Add raw byte column alongside human labels in asset inventory\u2014sorting and summing without unit ambiguity simplifies annual capacity planning meetings with finance and infrastructure teams together.<\/p>\n<p>Add unit suffix to every size column in internal dashboards by default so newcomers never guess which kilo you mean.<\/p>\n<p>Train support staff on prefix difference quarterly; new hires otherwise relearn same ticket patterns from scratch every rotation season.<\/p>\n<h2>Bookmark this tip: confusing KB with KiB<\/h2>\n<p>KB versus KiB discrepancies trace to decimal versus binary prefixes and bit\/byte confusion. Normalize to bytes, label clearly in software, and educate users on storage marketing. Exact 2^n byte values clarify tests when building upload validators or disk quota features.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Diagnose missing gigabytes and upload limit failures caused by decimal versus binary prefixes.<\/p>\n","protected":false},"author":1,"featured_media":61,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-troubleshooting-tips"],"_links":{"self":[{"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":3,"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":112,"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions\/112"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/media\/61"}],"wp:attachment":[{"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothepowerof2.com\/blog\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}