{"id":795,"date":"2026-03-25T07:46:39","date_gmt":"2026-03-25T07:46:39","guid":{"rendered":"https:\/\/primetoolhub.com\/?page_id=795"},"modified":"2026-07-17T11:29:19","modified_gmt":"2026-07-17T11:29:19","slug":"data-capacity-calculator-image-size","status":"publish","type":"page","link":"https:\/\/schoolict.net\/tools\/data-capacity-calculator-image-size\/","title":{"rendered":"Data Capacity Calculator | Storage, Codec &amp; Transfer Calculator"},"content":{"rendered":"\n<div class=\"pth-hero-section\">\n    <div class=\"pth-hero-content\">\n        <h2>Data Size &#038; Bandwidth Studio<\/h2>\n        <p>Instantly calculate data capacity, image file sizes, and download times offline. Convert between Bits, Bytes, KB, MB, GB, and TB with precision.<\/p>\n<\/div>\n\n <div class=\"pth-hero-image\">\n\t<img data-no-lazy=\"1\" src=\"https:\/\/schoolict.net\/tools\/wp-content\/uploads\/2026\/05\/data-capacity-calculator-800x447.jpeg\" width=\"800\" height=\"447\" alt=\"data capacity calculator\" fetchpriority=\"high\" loading=\"eager\" decoding=\"async\" style=\"width:100%; height:auto; display:block;\">\n  <\/div>\n<\/div>\n\n\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#\ud83d\udd34-your-1-tb-drive-is-not-missing-69-gb\">\ud83d\udd34\u00a0Your 1 TB Drive Is Not Missing 69 GB<\/a><ul><li><a href=\"#\ud83d\udfe2-when-the-difference-actually-bites\">\ud83d\udfe2\u00a0When the Difference Actually Bites<\/a><\/li><\/ul><\/li><li><a href=\"#\ud83d\udfe1-raw-image-size-and-why-nothing-is-ever-that-big\">\ud83d\udfe1\u00a0Raw Image Size, and Why Nothing Is Ever That Big<\/a><\/li><li><a href=\"#\ud83d\udd34-h-264-h-265-and-av-1-what-the-bitrates-actually-cost-you\">\ud83d\udd34\u00a0H.264, H.265 and AV1: What the Bitrates Actually Cost You<\/a><ul><li><a href=\"#\ud83d\udfe2-the-reverse-question-how-much-fits\">\ud83d\udfe2\u00a0The Reverse Question: How Much Fits?<\/a><\/li><\/ul><\/li><li><a href=\"#\ud83d\udfe1-mbps-is-not-mb-s-and-100-never-happens\">\ud83d\udfe1\u00a0Mbps Is Not MB\/s, and 100% Never Happens<\/a><\/li><\/ul><\/nav><\/div>\n\n\n<!-- LSCACHE_DISABLE -->\r\n<style>\r\n#pth-dss-wrapper{font-family:'Inter',system-ui,-apple-system,sans-serif;color:#1e293b;line-height:1.6;max-width:1400px;margin:0 auto;box-sizing:border-box;background:#f8fafc;padding:20px;border-radius:16px}\r\n#pth-dss-wrapper *{box-sizing:border-box;min-width:0}\r\n#pth-dss-wrapper .dss-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:22px;margin-bottom:20px;box-shadow:0 4px 6px -1px rgba(0,0,0,.04)}\r\n#pth-dss-wrapper h2.dss-title{font-size:1.5rem;font-weight:800;color:#1d4ed8;margin:0 0 6px}\r\n#pth-dss-wrapper .dss-sub{color:#334155;margin:0 0 12px;font-weight:500;font-size:.9rem}\r\n#pth-dss-wrapper .dss-meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:14px}\r\n#pth-dss-wrapper .dss-badge{font-size:.7rem;font-weight:800;padding:3px 10px;border-radius:20px}\r\n#pth-dss-wrapper .dss-b-blue{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}\r\n#pth-dss-wrapper .dss-b-green{background:#f0fdf4;color:#047857;border:1px solid #bbf7d0}\r\n#pth-dss-wrapper .dss-toolbar{display:flex;gap:8px;flex-wrap:wrap}\r\n#pth-dss-wrapper .dss-btn{border:none;padding:9px 18px;border-radius:8px;font-weight:700;cursor:pointer;font-size:.85rem;display:inline-flex;align-items:center;gap:6px;font-family:inherit;transition:.15s}\r\n#pth-dss-wrapper .dss-btn-primary{background:#2563eb;color:#fff}\r\n#pth-dss-wrapper .dss-btn-primary:hover{background:#1d4ed8}\r\n#pth-dss-wrapper .dss-btn-sec{background:#f1f5f9;color:#334155;border:1px solid #cbd5e1}\r\n#pth-dss-wrapper .dss-btn-sec:hover{background:#e2e8f0}\r\n#pth-dss-wrapper .dss-btn-purple{background:#f5f3ff;color:#5b21b6;border:1px solid #ddd6fe}\r\n#pth-dss-wrapper .dss-btn-danger{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}\r\n#pth-dss-wrapper .dss-grid{display:grid;grid-template-columns:1.8fr 1fr;gap:20px;align-items:start}\r\n#pth-dss-wrapper .dss-grid.dss-fw{grid-template-columns:1fr}\r\n#pth-dss-wrapper .dss-grid.dss-fw .dss-side{display:none}\r\n#pth-dss-wrapper .dss-main{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:22px;box-shadow:0 4px 6px -1px rgba(0,0,0,.04)}\r\n#pth-dss-wrapper .dss-side{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:22px}\r\n#pth-dss-wrapper .dss-tabs{display:flex;flex-wrap:wrap;border-bottom:2px solid #e2e8f0;margin-bottom:20px;gap:2px}\r\n#pth-dss-wrapper .dss-tab{background:transparent;border:none;padding:10px 15px;font-size:.85rem;font-weight:700;color:#334155;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;border-radius:8px 8px 0 0;font-family:inherit;transition:.15s;white-space:nowrap}\r\n#pth-dss-wrapper .dss-tab:hover{color:#1d4ed8;background:#f1f5f9}\r\n#pth-dss-wrapper .dss-tab.dss-active{color:#1d4ed8;border-bottom-color:#2563eb;background:#eff6ff}\r\n#pth-dss-wrapper .dss-panel{display:none}\r\n#pth-dss-wrapper .dss-panel.dss-active{display:block}\r\n#pth-dss-wrapper .dss-row2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}\r\n#pth-dss-wrapper .dss-row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-bottom:14px}\r\n#pth-dss-wrapper .dss-fld label{display:block;font-size:.8rem;font-weight:700;margin-bottom:6px;color:#334155}\r\n#pth-dss-wrapper .dss-inp{width:100%;padding:10px 13px;font-size:.95rem;border:2px solid #cbd5e1;border-radius:8px;font-family:'Courier New',monospace;font-weight:700;color:#0f172a;outline:none;background:#fff}\r\n#pth-dss-wrapper select.dss-inp{font-family:inherit;font-size:.88rem;font-weight:600}\r\n#pth-dss-wrapper .dss-inp:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1)}\r\n#pth-dss-wrapper .dss-std-toggle{display:flex;gap:0;margin-bottom:16px;border:2px solid #cbd5e1;border-radius:8px;overflow:hidden}\r\n#pth-dss-wrapper .dss-std-btn{flex:1;padding:10px;background:#fff;border:none;font-weight:700;font-size:.82rem;color:#334155;cursor:pointer;font-family:inherit;transition:.15s}\r\n#pth-dss-wrapper .dss-std-btn.dss-on{background:#2563eb;color:#fff}\r\n#pth-dss-wrapper .dss-res-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}\r\n#pth-dss-wrapper .dss-res{background:#f8fafc;border:1px solid #e2e8f0;padding:12px;border-radius:8px;text-align:center}\r\n#pth-dss-wrapper .dss-res label{display:block;font-size:.7rem;font-weight:800;color:#334155;margin-bottom:4px;text-transform:uppercase;letter-spacing:.3px}\r\n#pth-dss-wrapper .dss-res div{font-family:monospace;font-weight:800;font-size:.95rem;color:#0f172a;word-break:break-all}\r\n#pth-dss-wrapper .dss-res.dss-si{background:#eff6ff;border-color:#bfdbfe}\r\n#pth-dss-wrapper .dss-res.dss-si label{color:#1d4ed8}\r\n#pth-dss-wrapper .dss-res.dss-iec{background:#f0fdf4;border-color:#bbf7d0}\r\n#pth-dss-wrapper .dss-res.dss-iec label{color:#047857}\r\n#pth-dss-wrapper .dss-hero{background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;padding:18px;text-align:center;margin-bottom:14px}\r\n#pth-dss-wrapper .dss-hero-lbl{font-size:.78rem;font-weight:800;color:#334155;text-transform:uppercase;letter-spacing:.4px}\r\n#pth-dss-wrapper .dss-hero-val{font-size:1.9rem;font-weight:800;color:#1d4ed8;font-family:monospace;margin:6px 0;word-break:break-all}\r\n#pth-dss-wrapper .dss-hero-sub{font-size:.82rem;color:#334155;font-weight:500}\r\n#pth-dss-wrapper .dss-hero.dss-green{background:#f0fdf4;border-color:#bbf7d0}\r\n#pth-dss-wrapper .dss-hero.dss-green .dss-hero-val{color:#047857}\r\n#pth-dss-wrapper .dss-note{background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:12px 14px;font-size:.82rem;color:#92400e;font-weight:500;margin-bottom:14px;line-height:1.5}\r\n#pth-dss-wrapper .dss-info{background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;padding:12px 14px;font-size:.82rem;color:#1e293b;font-weight:500;margin-bottom:14px;line-height:1.5}\r\n#pth-dss-wrapper .dss-sec-lbl{font-size:.75rem;font-weight:800;color:#334155;text-transform:uppercase;letter-spacing:.4px;margin:18px 0 10px;border-bottom:2px solid #f1f5f9;padding-bottom:6px}\r\n#pth-dss-wrapper .dss-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}\r\n#pth-dss-wrapper .dss-chip{background:#f8fafc;border:1px solid #cbd5e1;border-radius:20px;padding:6px 13px;font-size:.78rem;font-weight:700;color:#334155;cursor:pointer;font-family:inherit;transition:.15s}\r\n#pth-dss-wrapper .dss-chip:hover{border-color:#2563eb;color:#1d4ed8;background:#eff6ff}\r\n#pth-dss-wrapper .dss-chip.dss-on{background:#2563eb;color:#fff;border-color:#2563eb}\r\n#pth-dss-wrapper .dss-tbl{width:100%;border-collapse:collapse;margin-bottom:14px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden}\r\n#pth-dss-wrapper .dss-tbl th{background:#f8fafc;padding:10px;font-size:.75rem;font-weight:800;color:#0f172a;text-align:left;border-bottom:1px solid #e2e8f0;text-transform:uppercase;letter-spacing:.3px}\r\n#pth-dss-wrapper .dss-tbl td{padding:9px 10px;font-size:.85rem;color:#1e293b;border-bottom:1px solid #f1f5f9;font-weight:500}\r\n#pth-dss-wrapper .dss-tbl tr:last-child td{border-bottom:none}\r\n#pth-dss-wrapper .dss-tbl .dss-mono{font-family:monospace;font-weight:800;color:#1d4ed8}\r\n#pth-dss-wrapper .dss-tbl .dss-best{background:#f0fdf4}\r\n#pth-dss-wrapper .dss-tbl .dss-best .dss-mono{color:#047857}\r\n#pth-dss-wrapper .dss-side h3{font-size:.95rem;font-weight:800;color:#0f172a;margin:0 0 10px}\r\n#pth-dss-wrapper .dss-side h3.dss-mt{margin-top:22px}\r\n#pth-dss-wrapper .dss-side p{font-size:.82rem;color:#1e293b;font-weight:500;margin:0 0 10px}\r\n#pth-dss-wrapper .dss-eq{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:12px;font-size:.8rem;color:#1e293b;line-height:1.8;font-weight:500}\r\n#pth-dss-wrapper .dss-eq code{background:#eff6ff;color:#1d4ed8;padding:1px 5px;border-radius:4px;font-weight:800;font-size:.78rem}\r\n#pth-dss-wrapper .dss-toast{visibility:hidden;min-width:220px;background:#0f172a;color:#fff;text-align:center;border-radius:8px;padding:12px 18px;position:fixed;z-index:99999;left:50%;bottom:30px;transform:translateX(-50%);font-size:.85rem;font-weight:700;opacity:0;transition:.3s;pointer-events:none}\r\n#pth-dss-wrapper .dss-toast.dss-show{visibility:visible;opacity:1;bottom:50px}\r\n#pth-dss-wrapper .dss-toast.dss-ok{background:#047857}\r\n#pth-dss-wrapper .dss-toast.dss-err{background:#991b1b}\r\n#pth-dss-wrapper .dss-xlink{background:#f5f3ff;border:1px solid #ddd6fe;border-radius:8px;padding:12px 14px;font-size:.82rem;color:#1e293b;font-weight:500;margin-top:14px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center}\r\n#pth-dss-wrapper .dss-xlink a{color:#5b21b6;font-weight:800;text-decoration:none}\r\n#pth-dss-wrapper .dss-xlink a:hover{text-decoration:underline}\r\n@media(max-width:900px){#pth-dss-wrapper .dss-grid{grid-template-columns:1fr}#pth-dss-wrapper .dss-row2,#pth-dss-wrapper .dss-row3{grid-template-columns:1fr}}\r\n<\/style>\r\n\r\n<div id=\"pth-dss-wrapper\">\r\n<div id=\"dss-toast\" class=\"dss-toast\" role=\"status\" aria-live=\"polite\"><\/div>\r\n\r\n<div class=\"dss-card\">\r\n  <h2 class=\"dss-title\">Data Size &amp; Bandwidth Studio<\/h2>\r\n  <p class=\"dss-sub\">Convert storage units (SI vs IEC), calculate raw image size, estimate video and audio storage by codec, predict transfer times and plan monthly bandwidth. 100% offline.<\/p>\r\n  <div class=\"dss-meta\">\r\n    <span class=\"dss-badge dss-b-blue\">v2.0<\/span>\r\n    <span class=\"dss-badge dss-b-green\">100% Offline<\/span>\r\n  <\/div>\r\n  <div class=\"dss-toolbar\">\r\n    <button type=\"button\" class=\"dss-btn dss-btn-purple\" id=\"dss-sample\">Load Sample<\/button>\r\n    <button type=\"button\" class=\"dss-btn dss-btn-sec\" id=\"dss-fw\">Full Width<\/button>\r\n    <button type=\"button\" class=\"dss-btn dss-btn-danger\" id=\"dss-clear\">Reset All<\/button>\r\n  <\/div>\r\n<\/div>\r\n\r\n<div class=\"dss-grid\" id=\"dss-grid\">\r\n<div class=\"dss-main\">\r\n\r\n<div class=\"dss-tabs\" role=\"tablist\" aria-label=\"Data Studio sections\">\r\n  <button type=\"button\" class=\"dss-tab dss-active\" data-tab=\"capacity\">Capacity Converter<\/button>\r\n  <button type=\"button\" class=\"dss-tab\" data-tab=\"image\">Raw Image Size<\/button>\r\n  <button type=\"button\" class=\"dss-tab\" data-tab=\"media\">Media Storage<\/button>\r\n  <button type=\"button\" class=\"dss-tab\" data-tab=\"transfer\">Transfer Time<\/button>\r\n  <button type=\"button\" class=\"dss-tab\" data-tab=\"bandwidth\">Bandwidth Planner<\/button>\r\n<\/div>\r\n\r\n<!-- CAPACITY -->\r\n<div id=\"dss-p-capacity\" class=\"dss-panel dss-active\">\r\n  <div class=\"dss-row2\">\r\n    <div class=\"dss-fld\"><label for=\"dss-cap-val\">Amount<\/label>\r\n      <input type=\"number\" id=\"dss-cap-val\" class=\"dss-inp\" value=\"1\" min=\"0\" step=\"any\"><\/div>\r\n    <div class=\"dss-fld\"><label for=\"dss-cap-unit\">Unit<\/label>\r\n      <select id=\"dss-cap-unit\" class=\"dss-inp\">\r\n        <option value=\"bit\">Bit (b)<\/option>\r\n        <option value=\"byte\" selected>Byte (B)<\/option>\r\n        <option value=\"kb\">Kilobyte (KB, 1000)<\/option>\r\n        <option value=\"kib\">Kibibyte (KiB, 1024)<\/option>\r\n        <option value=\"mb\">Megabyte (MB, 1000)<\/option>\r\n        <option value=\"mib\">Mebibyte (MiB, 1024)<\/option>\r\n        <option value=\"gb\">Gigabyte (GB, 1000)<\/option>\r\n        <option value=\"gib\">Gibibyte (GiB, 1024)<\/option>\r\n        <option value=\"tb\">Terabyte (TB, 1000)<\/option>\r\n        <option value=\"tib\">Tebibyte (TiB, 1024)<\/option>\r\n        <option value=\"pb\">Petabyte (PB, 1000)<\/option>\r\n      <\/select><\/div>\r\n  <\/div>\r\n\r\n  <div class=\"dss-std-toggle\" role=\"group\" aria-label=\"Unit standard\">\r\n    <button type=\"button\" class=\"dss-std-btn dss-on\" data-std=\"both\">Show Both<\/button>\r\n    <button type=\"button\" class=\"dss-std-btn\" data-std=\"si\">SI Decimal (1000)<\/button>\r\n    <button type=\"button\" class=\"dss-std-btn\" data-std=\"iec\">IEC Binary (1024)<\/button>\r\n  <\/div>\r\n\r\n  <div id=\"dss-si-block\">\r\n    <div class=\"dss-sec-lbl\">SI Decimal &mdash; base 1000 (used by drive manufacturers, network speeds)<\/div>\r\n    <div class=\"dss-res-grid\">\r\n      <div class=\"dss-res dss-si\"><label>Bits<\/label><div id=\"dss-r-bit\">0<\/div><\/div>\r\n      <div class=\"dss-res dss-si\"><label>Bytes<\/label><div id=\"dss-r-byte\">0<\/div><\/div>\r\n      <div class=\"dss-res dss-si\"><label>KB<\/label><div id=\"dss-r-kb\">0<\/div><\/div>\r\n      <div class=\"dss-res dss-si\"><label>MB<\/label><div id=\"dss-r-mb\">0<\/div><\/div>\r\n      <div class=\"dss-res dss-si\"><label>GB<\/label><div id=\"dss-r-gb\">0<\/div><\/div>\r\n      <div class=\"dss-res dss-si\"><label>TB<\/label><div id=\"dss-r-tb\">0<\/div><\/div>\r\n      <div class=\"dss-res dss-si\"><label>PB<\/label><div id=\"dss-r-pb\">0<\/div><\/div>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div id=\"dss-iec-block\">\r\n    <div class=\"dss-sec-lbl\">IEC Binary &mdash; base 1024 (what Windows, macOS and Linux actually report)<\/div>\r\n    <div class=\"dss-res-grid\">\r\n      <div class=\"dss-res dss-iec\"><label>KiB<\/label><div id=\"dss-r-kib\">0<\/div><\/div>\r\n      <div class=\"dss-res dss-iec\"><label>MiB<\/label><div id=\"dss-r-mib\">0<\/div><\/div>\r\n      <div class=\"dss-res dss-iec\"><label>GiB<\/label><div id=\"dss-r-gib\">0<\/div><\/div>\r\n      <div class=\"dss-res dss-iec\"><label>TiB<\/label><div id=\"dss-r-tib\">0<\/div><\/div>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"dss-note\" id=\"dss-drive-note\">\r\n    <strong>Why your 1 TB drive shows as 931 GB:<\/strong> the manufacturer sells 1 TB = 1,000,000,000,000 bytes (SI). Windows divides by 1024 three times and labels the result &quot;GB&quot; &mdash; but it is really GiB. Same bytes, different maths, no missing storage.\r\n  <\/div>\r\n<\/div>\r\n\r\n<!-- IMAGE -->\r\n<div id=\"dss-p-image\" class=\"dss-panel\">\r\n  <div class=\"dss-sec-lbl\">Resolution Presets<\/div>\r\n  <div class=\"dss-chips\" id=\"dss-img-presets\"><\/div>\r\n  <div class=\"dss-row3\">\r\n    <div class=\"dss-fld\"><label for=\"dss-img-w\">Width (px)<\/label>\r\n      <input type=\"number\" id=\"dss-img-w\" class=\"dss-inp\" value=\"1920\" min=\"1\"><\/div>\r\n    <div class=\"dss-fld\"><label for=\"dss-img-h\">Height (px)<\/label>\r\n      <input type=\"number\" id=\"dss-img-h\" class=\"dss-inp\" value=\"1080\" min=\"1\"><\/div>\r\n    <div class=\"dss-fld\"><label for=\"dss-img-depth\">Colour Depth<\/label>\r\n      <select id=\"dss-img-depth\" class=\"dss-inp\">\r\n        <option value=\"1\">1-bit (Mono, 2 colours)<\/option>\r\n        <option value=\"8\">8-bit (256 colours)<\/option>\r\n        <option value=\"16\">16-bit (65,536 colours)<\/option>\r\n        <option value=\"24\" selected>24-bit (True Colour, 16.7M)<\/option>\r\n        <option value=\"32\">32-bit (True Colour + Alpha)<\/option>\r\n        <option value=\"48\">48-bit (16-bit per channel RAW)<\/option>\r\n      <\/select><\/div>\r\n  <\/div>\r\n\r\n  <div class=\"dss-hero\">\r\n    <div class=\"dss-hero-lbl\">Uncompressed Raw Size<\/div>\r\n    <div class=\"dss-hero-val\" id=\"dss-img-raw\">5.93 MiB<\/div>\r\n    <div class=\"dss-hero-sub\" id=\"dss-img-stats\">2,073,600 pixels &bull; 6,220,800 bytes<\/div>\r\n  <\/div>\r\n\r\n  <div class=\"dss-sec-lbl\">Realistic Compressed Estimates<\/div>\r\n  <table class=\"dss-tbl\">\r\n    <thead><tr><th>Format<\/th><th>Typical Size<\/th><th>vs Raw<\/th><th>Notes<\/th><\/tr><\/thead>\r\n    <tbody id=\"dss-img-comp\"><\/tbody>\r\n  <\/table>\r\n  <div class=\"dss-info\">These are typical ranges for a photographic image, not guarantees. A flat graphic compresses far better than a detailed photo; noise and fine texture compress worse. PNG is lossless, so it stays large on photos.<\/div>\r\n  <div class=\"dss-xlink\">\r\n    <span>Want to actually compress and convert an image, not just estimate it?<\/span>\r\n    <a href=\"\/free-advanced-image-studio-pro\/\" target=\"_blank\" rel=\"noopener\">Advanced Image Studio Pro<\/a>\r\n  <\/div>\r\n<\/div>\r\n\r\n<!-- MEDIA -->\r\n<div id=\"dss-p-media\" class=\"dss-panel\">\r\n  <div class=\"dss-row2\">\r\n    <div class=\"dss-fld\"><label for=\"dss-media-type\">Media Type<\/label>\r\n      <select id=\"dss-media-type\" class=\"dss-inp\">\r\n        <option value=\"video\" selected>Video<\/option>\r\n        <option value=\"audio\">Audio<\/option>\r\n      <\/select><\/div>\r\n    <div class=\"dss-fld\"><label for=\"dss-media-mode\">Calculate<\/label>\r\n      <select id=\"dss-media-mode\" class=\"dss-inp\">\r\n        <option value=\"size\" selected>Duration to File Size<\/option>\r\n        <option value=\"dur\">Storage to Duration<\/option>\r\n      <\/select><\/div>\r\n  <\/div>\r\n\r\n  <div id=\"dss-video-opts\">\r\n    <div class=\"dss-row2\">\r\n      <div class=\"dss-fld\"><label for=\"dss-codec\">Video Codec<\/label>\r\n        <select id=\"dss-codec\" class=\"dss-inp\">\r\n          <option value=\"h264\" selected>H.264 \/ AVC (widest support)<\/option>\r\n          <option value=\"h265\">H.265 \/ HEVC (~50% smaller)<\/option>\r\n          <option value=\"av1\">AV1 (~30% smaller than HEVC)<\/option>\r\n        <\/select><\/div>\r\n      <div class=\"dss-fld\"><label for=\"dss-vres\">Resolution \/ Quality<\/label>\r\n        <select id=\"dss-vres\" class=\"dss-inp\"><\/select><\/div>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div id=\"dss-audio-opts\" style=\"display:none;\">\r\n    <div class=\"dss-fld\"><label for=\"dss-ares\">Audio Format &amp; Bitrate<\/label>\r\n      <select id=\"dss-ares\" class=\"dss-inp\"><\/select><\/div>\r\n  <\/div>\r\n\r\n  <div class=\"dss-row2\">\r\n    <div class=\"dss-fld\"><label for=\"dss-bitrate\">Bitrate (Mbps for video, kbps for audio)<\/label>\r\n      <input type=\"number\" id=\"dss-bitrate\" class=\"dss-inp\" value=\"8\" min=\"0.01\" step=\"any\"><\/div>\r\n    <div class=\"dss-fld\" id=\"dss-dur-fld\"><label for=\"dss-dur\">Duration (minutes)<\/label>\r\n      <input type=\"number\" id=\"dss-dur\" class=\"dss-inp\" value=\"60\" min=\"0\" step=\"any\"><\/div>\r\n    <div class=\"dss-fld\" id=\"dss-store-fld\" style=\"display:none;\"><label for=\"dss-store\">Available Storage (GB)<\/label>\r\n      <input type=\"number\" id=\"dss-store\" class=\"dss-inp\" value=\"128\" min=\"0\" step=\"any\"><\/div>\r\n  <\/div>\r\n\r\n  <div class=\"dss-hero dss-green\">\r\n    <div class=\"dss-hero-lbl\" id=\"dss-media-lbl\">Estimated File Size<\/div>\r\n    <div class=\"dss-hero-val\" id=\"dss-media-val\">3.52 GB<\/div>\r\n    <div class=\"dss-hero-sub\" id=\"dss-media-sub\">8 Mbps &bull; 60 minutes<\/div>\r\n  <\/div>\r\n\r\n  <div class=\"dss-sec-lbl\">Same Content, All Three Codecs<\/div>\r\n  <table class=\"dss-tbl\">\r\n    <thead><tr><th>Codec<\/th><th>Bitrate<\/th><th>Size<\/th><th>Saving<\/th><\/tr><\/thead>\r\n    <tbody id=\"dss-codec-cmp\"><\/tbody>\r\n  <\/table>\r\n  <div class=\"dss-info\">Bitrates are typical streaming and recording targets, not fixed standards. Real encoders vary with motion, grain and encoder settings. H.265 and AV1 need more CPU to encode and decode, which is the trade for the smaller file.<\/div>\r\n<\/div>\r\n\r\n<!-- TRANSFER -->\r\n<div id=\"dss-p-transfer\" class=\"dss-panel\">\r\n  <div class=\"dss-sec-lbl\">Connection Presets<\/div>\r\n  <div class=\"dss-chips\" id=\"dss-conn-presets\"><\/div>\r\n  <div class=\"dss-row3\">\r\n    <div class=\"dss-fld\"><label for=\"dss-file-size\">File Size<\/label>\r\n      <input type=\"number\" id=\"dss-file-size\" class=\"dss-inp\" value=\"5\" min=\"0\" step=\"any\"><\/div>\r\n    <div class=\"dss-fld\"><label for=\"dss-file-unit\">Size Unit<\/label>\r\n      <select id=\"dss-file-unit\" class=\"dss-inp\">\r\n        <option value=\"mb\">MB<\/option>\r\n        <option value=\"gb\" selected>GB<\/option>\r\n        <option value=\"tb\">TB<\/option>\r\n      <\/select><\/div>\r\n    <div class=\"dss-fld\"><label for=\"dss-speed-unit\">Speed Unit<\/label>\r\n      <select id=\"dss-speed-unit\" class=\"dss-inp\">\r\n        <option value=\"kbps\">Kbps<\/option>\r\n        <option value=\"mbps\" selected>Mbps<\/option>\r\n        <option value=\"gbps\">Gbps<\/option>\r\n      <\/select><\/div>\r\n  <\/div>\r\n  <div class=\"dss-row2\">\r\n    <div class=\"dss-fld\"><label for=\"dss-speed\">Connection Speed<\/label>\r\n      <input type=\"number\" id=\"dss-speed\" class=\"dss-inp\" value=\"100\" min=\"0.01\" step=\"any\"><\/div>\r\n    <div class=\"dss-fld\"><label for=\"dss-overhead\">Real-World Efficiency (%)<\/label>\r\n      <input type=\"number\" id=\"dss-overhead\" class=\"dss-inp\" value=\"80\" min=\"1\" max=\"100\" step=\"1\"><\/div>\r\n  <\/div>\r\n\r\n  <div class=\"dss-hero dss-green\">\r\n    <div class=\"dss-hero-lbl\">Realistic Transfer Time<\/div>\r\n    <div class=\"dss-hero-val\" id=\"dss-time-real\">--<\/div>\r\n    <div class=\"dss-hero-sub\" id=\"dss-time-ideal\">--<\/div>\r\n  <\/div>\r\n  <div class=\"dss-note\">\r\n    <strong>Mbps is not MB\/s.<\/strong> Speeds are sold in mega<em>bits<\/em>; files are measured in mega<em>bytes<\/em>. Divide by 8. A 100 Mbps line moves at best 12.5 MB\/s &mdash; and never hits that in practice. The efficiency figure accounts for TCP overhead, congestion and Wi-Fi loss; 80% is a fair real-world default, 90-95% for wired fibre.\r\n  <\/div>\r\n<\/div>\r\n\r\n<!-- BANDWIDTH -->\r\n<div id=\"dss-p-bandwidth\" class=\"dss-panel\">\r\n  <div class=\"dss-info\">Estimate how much monthly data transfer your site will use, so you can size a hosting plan before you get billed for an overage.<\/div>\r\n  <div class=\"dss-row3\">\r\n    <div class=\"dss-fld\"><label for=\"dss-visitors\">Visitors per Month<\/label>\r\n      <input type=\"number\" id=\"dss-visitors\" class=\"dss-inp\" value=\"10000\" min=\"0\" step=\"any\"><\/div>\r\n    <div class=\"dss-fld\"><label for=\"dss-pages\">Pages per Visit<\/label>\r\n      <input type=\"number\" id=\"dss-pages\" class=\"dss-inp\" value=\"3\" min=\"0\" step=\"any\"><\/div>\r\n    <div class=\"dss-fld\"><label for=\"dss-weight\">Avg Page Weight (MB)<\/label>\r\n      <input type=\"number\" id=\"dss-weight\" class=\"dss-inp\" value=\"2.5\" min=\"0\" step=\"any\"><\/div>\r\n  <\/div>\r\n  <div class=\"dss-row2\">\r\n    <div class=\"dss-fld\"><label for=\"dss-cache-hit\">Cache Hit Rate (%)<\/label>\r\n      <input type=\"number\" id=\"dss-cache-hit\" class=\"dss-inp\" value=\"0\" min=\"0\" max=\"95\" step=\"1\"><\/div>\r\n    <div class=\"dss-fld\"><label for=\"dss-growth\">Growth Headroom (%)<\/label>\r\n      <input type=\"number\" id=\"dss-growth\" class=\"dss-inp\" value=\"30\" min=\"0\" step=\"1\"><\/div>\r\n  <\/div>\r\n\r\n  <div class=\"dss-hero\">\r\n    <div class=\"dss-hero-lbl\">Monthly Transfer Needed<\/div>\r\n    <div class=\"dss-hero-val\" id=\"dss-bw-val\">--<\/div>\r\n    <div class=\"dss-hero-sub\" id=\"dss-bw-sub\">--<\/div>\r\n  <\/div>\r\n  <table class=\"dss-tbl\">\r\n    <thead><tr><th>Metric<\/th><th>Value<\/th><\/tr><\/thead>\r\n    <tbody id=\"dss-bw-tbl\"><\/tbody>\r\n  <\/table>\r\n  <div class=\"dss-info\">Cache hit rate is the share of requests served by a CDN or browser cache rather than your origin server. If you run Cloudflare or similar in front of the site, a large slice of static assets never touches your host, so raise this figure. If you have no CDN, leave it at 0.<\/div>\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n<div class=\"dss-side\">\r\n  <h3>Unit Equivalents<\/h3>\r\n  <div class=\"dss-eq\">\r\n    <code>1 B<\/code> = 8 bits<br>\r\n    <code>1 KB<\/code> = 1,000 bytes (SI)<br>\r\n    <code>1 KiB<\/code> = 1,024 bytes (IEC)<br>\r\n    <code>1 MB<\/code> = 1,000 KB<br>\r\n    <code>1 MiB<\/code> = 1,024 KiB<br>\r\n    <code>1 GiB<\/code> = 1,024 MiB\r\n  <\/div>\r\n\r\n  <h3 class=\"dss-mt\">Real File Sizes<\/h3>\r\n  <table class=\"dss-tbl\">\r\n    <thead><tr><th>Content<\/th><th>Typical<\/th><\/tr><\/thead>\r\n    <tbody>\r\n      <tr><td>Plain text page<\/td><td class=\"dss-mono\">~2 KB<\/td><\/tr>\r\n      <tr><td>Web photo (WebP)<\/td><td class=\"dss-mono\">~150 KB<\/td><\/tr>\r\n      <tr><td>Phone photo (JPEG)<\/td><td class=\"dss-mono\">~3-5 MB<\/td><\/tr>\r\n      <tr><td>MP3 song, 320k<\/td><td class=\"dss-mono\">~7 MB<\/td><\/tr>\r\n      <tr><td>1 hr 1080p H.264<\/td><td class=\"dss-mono\">~3.5 GB<\/td><\/tr>\r\n      <tr><td>1 hr 1080p AV1<\/td><td class=\"dss-mono\">~1.3 GB<\/td><\/tr>\r\n      <tr><td>1 hr 4K H.265<\/td><td class=\"dss-mono\">~8 GB<\/td><\/tr>\r\n    <\/tbody>\r\n  <\/table>\r\n\r\n  <h3 class=\"dss-mt\">Codec Cheat Sheet<\/h3>\r\n  <p><strong>H.264 \/ AVC<\/strong> &mdash; plays on everything, fastest to encode, largest files. The safe default.<\/p>\r\n  <p><strong>H.265 \/ HEVC<\/strong> &mdash; roughly half the bitrate for the same quality. Patent-licensed; browser support is patchy.<\/p>\r\n  <p><strong>AV1<\/strong> &mdash; royalty-free, smallest files, but slow to encode and needs recent hardware to decode smoothly.<\/p>\r\n\r\n  <div class=\"dss-xlink\" style=\"margin-top:18px;\">\r\n    <span>Converting between binary, hex and decimal?<\/span>\r\n    <a href=\"\/number-base-converter-calculator\/\" target=\"_blank\" rel=\"noopener\">Number Base Converter<\/a>\r\n  <\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n<script data-no-optimize=\"1\" data-no-minify=\"1\" data-cfasync=\"false\">\r\n(function(){\r\n'use strict';\r\nif(window.pthDataStudioApp){return;}\r\n\r\nvar VIDEO_BITRATES={\r\nh264:[\r\n{k:'480p30',label:'480p SD 30fps',br:2.5},\r\n{k:'720p30',label:'720p HD 30fps',br:5},\r\n{k:'720p60',label:'720p HD 60fps',br:7.5},\r\n{k:'1080p30',label:'1080p Full HD 30fps',br:8},\r\n{k:'1080p60',label:'1080p Full HD 60fps',br:12},\r\n{k:'1440p30',label:'1440p QHD 30fps',br:16},\r\n{k:'2160p30',label:'2160p 4K 30fps',br:35},\r\n{k:'2160p60',label:'2160p 4K 60fps',br:53},\r\n{k:'4320p30',label:'4320p 8K 30fps',br:100}\r\n],\r\nh265:[\r\n{k:'480p30',label:'480p SD 30fps',br:1.2},\r\n{k:'720p30',label:'720p HD 30fps',br:2.5},\r\n{k:'720p60',label:'720p HD 60fps',br:3.8},\r\n{k:'1080p30',label:'1080p Full HD 30fps',br:4},\r\n{k:'1080p60',label:'1080p Full HD 60fps',br:6},\r\n{k:'1440p30',label:'1440p QHD 30fps',br:8},\r\n{k:'2160p30',label:'2160p 4K 30fps',br:18},\r\n{k:'2160p60',label:'2160p 4K 60fps',br:27},\r\n{k:'4320p30',label:'4320p 8K 30fps',br:50}\r\n],\r\nav1:[\r\n{k:'480p30',label:'480p SD 30fps',br:0.9},\r\n{k:'720p30',label:'720p HD 30fps',br:1.8},\r\n{k:'720p60',label:'720p HD 60fps',br:2.7},\r\n{k:'1080p30',label:'1080p Full HD 30fps',br:2.9},\r\n{k:'1080p60',label:'1080p Full HD 60fps',br:4.3},\r\n{k:'1440p30',label:'1440p QHD 30fps',br:5.8},\r\n{k:'2160p30',label:'2160p 4K 30fps',br:13},\r\n{k:'2160p60',label:'2160p 4K 60fps',br:19},\r\n{k:'4320p30',label:'4320p 8K 30fps',br:36}\r\n]\r\n};\r\n\r\nvar CODEC_NAMES={h264:'H.264 \/ AVC',h265:'H.265 \/ HEVC',av1:'AV1'};\r\n\r\nvar AUDIO_PRESETS=[\r\n{k:'mp3_128',label:'MP3 128 kbps (standard)',br:128},\r\n{k:'mp3_192',label:'MP3 192 kbps (good)',br:192},\r\n{k:'mp3_320',label:'MP3 320 kbps (max)',br:320},\r\n{k:'aac_128',label:'AAC 128 kbps (streaming)',br:128},\r\n{k:'aac_256',label:'AAC 256 kbps (Apple Music)',br:256},\r\n{k:'opus_96',label:'Opus 96 kbps (efficient)',br:96},\r\n{k:'opus_128',label:'Opus 128 kbps',br:128},\r\n{k:'podcast',label:'Podcast mono 64 kbps',br:64},\r\n{k:'flac',label:'FLAC lossless (~900 kbps)',br:900},\r\n{k:'wav',label:'WAV \/ PCM CD 1411 kbps',br:1411}\r\n];\r\n\r\nvar IMG_PRESETS=[\r\n{label:'HD 1280x720',w:1280,h:720},\r\n{label:'Full HD 1920x1080',w:1920,h:1080},\r\n{label:'QHD 2560x1440',w:2560,h:1440},\r\n{label:'4K 3840x2160',w:3840,h:2160},\r\n{label:'8K 7680x4320',w:7680,h:4320},\r\n{label:'A4 @300dpi',w:2480,h:3508},\r\n{label:'Instagram 1080x1080',w:1080,h:1080},\r\n{label:'DSLR 24MP',w:6000,h:4000}\r\n];\r\n\r\nvar CONN_PRESETS=[\r\n{label:'ADSL 8 Mbps',v:8,u:'mbps',eff:75},\r\n{label:'4G ~30 Mbps',v:30,u:'mbps',eff:70},\r\n{label:'Cable 100 Mbps',v:100,u:'mbps',eff:85},\r\n{label:'Fibre 300 Mbps',v:300,u:'mbps',eff:90},\r\n{label:'Fibre 1 Gbps',v:1,u:'gbps',eff:90},\r\n{label:'5G ~200 Mbps',v:200,u:'mbps',eff:70}\r\n];\r\n\r\nwindow.pthDataStudioApp={\r\ninitialized:false,\r\nstd:'both',\r\ntoastTimer:null,\r\n\r\nel:function(id){return document.getElementById(id);},\r\n\r\ntoast:function(msg,type){\r\nvar t=this.el('dss-toast');\r\nif(!t)return;\r\nt.textContent=msg;\r\nt.className='dss-toast dss-show'+(type==='err'?' dss-err':' dss-ok');\r\nvar self=this;\r\nclearTimeout(self.toastTimer);\r\nself.toastTimer=setTimeout(function(){t.className='dss-toast';},3000);\r\n},\r\n\r\nswitchTab:function(id){\r\nvar w=this.el('pth-dss-wrapper');\r\nif(!w)return;\r\nvar i,tabs=w.querySelectorAll('.dss-tab'),panels=w.querySelectorAll('.dss-panel');\r\nfor(i=0;i<tabs.length;i++)tabs[i].classList.remove('dss-active');\r\nfor(i=0;i<panels.length;i++)panels[i].classList.remove('dss-active');\r\nvar b=w.querySelector('.dss-tab[data-tab=\"'+id+'\"]'),p=this.el('dss-p-'+id);\r\nif(b)b.classList.add('dss-active');\r\nif(p)p.classList.add('dss-active');\r\n},\r\n\r\nnum:function(id){var e=this.el(id);return e?(parseFloat(e.value)||0):0;},\r\n\r\nfmt:function(n){\r\nif(n===0)return '0';\r\nif(!isFinite(n))return '0';\r\nif(n<0.001)return n.toExponential(3);\r\nif(n>=1e15)return n.toExponential(4);\r\nif(n===Math.floor(n))return n.toLocaleString('en-US');\r\nreturn n.toLocaleString('en-US',{maximumFractionDigits:3});\r\n},\r\n\r\n\/* bytes -> human string using IEC (1024) *\/\r\nhumanIEC:function(b){\r\nif(b<1024)return this.fmt(b)+' B';\r\nif(b<1048576)return this.fmt(b\/1024)+' KiB';\r\nif(b<1073741824)return this.fmt(b\/1048576)+' MiB';\r\nif(b<1099511627776)return this.fmt(b\/1073741824)+' GiB';\r\nreturn this.fmt(b\/1099511627776)+' TiB';\r\n},\r\n\r\n\/* bytes -> human string using SI (1000) *\/\r\nhumanSI:function(b){\r\nif(b<1000)return this.fmt(b)+' B';\r\nif(b<1e6)return this.fmt(b\/1000)+' KB';\r\nif(b<1e9)return this.fmt(b\/1e6)+' MB';\r\nif(b<1e12)return this.fmt(b\/1e9)+' GB';\r\nreturn this.fmt(b\/1e12)+' TB';\r\n},\r\n\r\ntoBytes:function(amount,unit){\r\nvar m={\r\nbit:1\/8, byte:1,\r\nkb:1000, mb:1e6, gb:1e9, tb:1e12, pb:1e15,\r\nkib:1024, mib:1048576, gib:1073741824, tib:1099511627776\r\n};\r\nreturn amount*(m[unit]||1);\r\n},\r\n\r\n\/* ---------- TAB 1: CAPACITY ---------- *\/\r\ncalcCapacity:function(){\r\nvar amt=this.num('dss-cap-val');\r\nvar unit=this.el('dss-cap-unit').value;\r\nvar b=this.toBytes(amt,unit);\r\nthis.el('dss-r-bit').textContent=this.fmt(b*8);\r\nthis.el('dss-r-byte').textContent=this.fmt(b);\r\nthis.el('dss-r-kb').textContent=this.fmt(b\/1000);\r\nthis.el('dss-r-mb').textContent=this.fmt(b\/1e6);\r\nthis.el('dss-r-gb').textContent=this.fmt(b\/1e9);\r\nthis.el('dss-r-tb').textContent=this.fmt(b\/1e12);\r\nthis.el('dss-r-pb').textContent=this.fmt(b\/1e15);\r\nthis.el('dss-r-kib').textContent=this.fmt(b\/1024);\r\nthis.el('dss-r-mib').textContent=this.fmt(b\/1048576);\r\nthis.el('dss-r-gib').textContent=this.fmt(b\/1073741824);\r\nthis.el('dss-r-tib').textContent=this.fmt(b\/1099511627776);\r\nthis.calcTransfer();\r\n},\r\n\r\napplyStd:function(std){\r\nthis.std=std;\r\nvar w=this.el('pth-dss-wrapper');\r\nvar btns=w.querySelectorAll('.dss-std-btn'),i;\r\nfor(i=0;i<btns.length;i++){\r\nif(btns[i].getAttribute('data-std')===std)btns[i].classList.add('dss-on');\r\nelse btns[i].classList.remove('dss-on');\r\n}\r\nthis.el('dss-si-block').style.display=(std==='iec')?'none':'block';\r\nthis.el('dss-iec-block').style.display=(std==='si')?'none':'block';\r\nthis.el('dss-drive-note').style.display=(std==='both')?'block':'none';\r\n},\r\n\r\n\/* ---------- TAB 2: IMAGE ---------- *\/\r\nbuildImgPresets:function(){\r\nvar box=this.el('dss-img-presets');\r\nif(!box)return;\r\nvar self=this,h='',i;\r\nfor(i=0;i<IMG_PRESETS.length;i++){\r\nh+='<button type=\"button\" class=\"dss-chip\" data-w=\"'+IMG_PRESETS[i].w+'\" data-h=\"'+IMG_PRESETS[i].h+'\">'+IMG_PRESETS[i].label+'<\/button>';\r\n}\r\nbox.innerHTML=h;\r\nvar chips=box.querySelectorAll('.dss-chip');\r\nfor(i=0;i<chips.length;i++){\r\nchips[i].addEventListener('click',function(){\r\nself.el('dss-img-w').value=this.getAttribute('data-w');\r\nself.el('dss-img-h').value=this.getAttribute('data-h');\r\nvar all=box.querySelectorAll('.dss-chip'),j;\r\nfor(j=0;j<all.length;j++)all[j].classList.remove('dss-on');\r\nthis.classList.add('dss-on');\r\nself.calcImage();\r\n});\r\n}\r\n},\r\n\r\ncalcImage:function(){\r\nvar w=Math.max(0,Math.floor(this.num('dss-img-w')));\r\nvar h=Math.max(0,Math.floor(this.num('dss-img-h')));\r\nvar d=parseInt(this.el('dss-img-depth').value,10)||24;\r\nvar px=w*h;\r\nvar rawBytes=px*d\/8;\r\nthis.el('dss-img-raw').textContent=this.humanIEC(rawBytes);\r\nthis.el('dss-img-stats').textContent=this.fmt(px)+' pixels \\u2022 '+this.fmt(rawBytes)+' bytes \\u2022 '+this.humanSI(rawBytes)+' (SI)';\r\n\r\n\/* typical photographic compression ratios vs raw 24-bit *\/\r\nvar rows=[\r\n{n:'WebP (q80)',lo:0.02,hi:0.04,note:'Best for web. Smallest at equal quality.',best:true},\r\n{n:'JPEG (q80)',lo:0.03,hi:0.06,note:'Universal support. Lossy.',best:false},\r\n{n:'PNG',lo:0.30,hi:0.60,note:'Lossless. Stays large on photos.',best:false},\r\n{n:'TIFF \/ RAW',lo:0.80,hi:1.00,note:'Near-uncompressed archival.',best:false}\r\n];\r\nvar html='',i;\r\nfor(i=0;i<rows.length;i++){\r\nvar r=rows[i];\r\nvar lo=rawBytes*r.lo, hi=rawBytes*r.hi;\r\nvar pctLo=Math.round(r.lo*100), pctHi=Math.round(r.hi*100);\r\nhtml+='<tr'+(r.best?' class=\"dss-best\"':'')+'>';\r\nhtml+='<td><strong>'+r.n+'<\/strong><\/td>';\r\nhtml+='<td class=\"dss-mono\">'+this.humanIEC(lo)+' \\u2013 '+this.humanIEC(hi)+'<\/td>';\r\nhtml+='<td class=\"dss-mono\">'+pctLo+'\\u2013'+pctHi+'%<\/td>';\r\nhtml+='<td>'+r.note+'<\/td><\/tr>';\r\n}\r\nthis.el('dss-img-comp').innerHTML=html;\r\n},\r\n\r\n\/* ---------- TAB 3: MEDIA ---------- *\/\r\nfillVideoRes:function(){\r\nvar codec=this.el('dss-codec').value;\r\nvar list=VIDEO_BITRATES[codec]||VIDEO_BITRATES.h264;\r\nvar sel=this.el('dss-vres');\r\nvar prev=sel.value;\r\nvar h='',i;\r\nfor(i=0;i<list.length;i++){\r\nh+='<option value=\"'+list[i].k+'\">'+list[i].label+' ('+list[i].br+' Mbps)<\/option>';\r\n}\r\nsel.innerHTML=h;\r\nif(prev){sel.value=prev;}\r\nif(!sel.value)sel.value='1080p30';\r\nthis.syncBitrateFromPreset();\r\n},\r\n\r\nfillAudioRes:function(){\r\nvar sel=this.el('dss-ares');\r\nvar h='',i;\r\nfor(i=0;i<AUDIO_PRESETS.length;i++){\r\nh+='<option value=\"'+AUDIO_PRESETS[i].k+'\">'+AUDIO_PRESETS[i].label+'<\/option>';\r\n}\r\nsel.innerHTML=h;\r\nsel.value='mp3_192';\r\n},\r\n\r\nsyncBitrateFromPreset:function(){\r\nvar type=this.el('dss-media-type').value;\r\nvar br=0,i;\r\nif(type==='video'){\r\nvar codec=this.el('dss-codec').value;\r\nvar key=this.el('dss-vres').value;\r\nvar list=VIDEO_BITRATES[codec]||[];\r\nfor(i=0;i<list.length;i++){if(list[i].k===key){br=list[i].br;break;}}\r\n}else{\r\nvar akey=this.el('dss-ares').value;\r\nfor(i=0;i<AUDIO_PRESETS.length;i++){if(AUDIO_PRESETS[i].k===akey){br=AUDIO_PRESETS[i].br;break;}}\r\n}\r\nif(br>0)this.el('dss-bitrate').value=br;\r\nthis.calcMedia();\r\n},\r\n\r\ntoggleMediaUI:function(){\r\nvar type=this.el('dss-media-type').value;\r\nvar mode=this.el('dss-media-mode').value;\r\nthis.el('dss-video-opts').style.display=(type==='video')?'block':'none';\r\nthis.el('dss-audio-opts').style.display=(type==='audio')?'block':'none';\r\nthis.el('dss-dur-fld').style.display=(mode==='size')?'block':'none';\r\nthis.el('dss-store-fld').style.display=(mode==='dur')?'block':'none';\r\nthis.syncBitrateFromPreset();\r\n},\r\n\r\n\/* bitrate in Mbps (video) or kbps (audio) -> bits per second *\/\r\nbitsPerSec:function(){\r\nvar type=this.el('dss-media-type').value;\r\nvar br=this.num('dss-bitrate');\r\nreturn type==='video'?br*1e6:br*1000;\r\n},\r\n\r\ncalcMedia:function(){\r\nvar type=this.el('dss-media-type').value;\r\nvar mode=this.el('dss-media-mode').value;\r\nvar bps=this.bitsPerSec();\r\nvar lbl=this.el('dss-media-lbl');\r\nvar val=this.el('dss-media-val');\r\nvar sub=this.el('dss-media-sub');\r\nvar brDisp=this.num('dss-bitrate')+(type==='video'?' Mbps':' kbps');\r\n\r\nif(mode==='size'){\r\nvar mins=this.num('dss-dur');\r\nvar secs=mins*60;\r\nvar bytes=bps*secs\/8;\r\nlbl.textContent='Estimated File Size';\r\nval.textContent=this.humanIEC(bytes);\r\nsub.textContent=brDisp+' \\u2022 '+this.fmt(mins)+' min \\u2022 '+this.humanSI(bytes)+' (SI)';\r\n}else{\r\nvar gb=this.num('dss-store');\r\nvar bytesAvail=gb*1e9;\r\nvar secsAvail=bps>0?(bytesAvail*8\/bps):0;\r\nvar hrs=Math.floor(secsAvail\/3600);\r\nvar mn=Math.floor((secsAvail%3600)\/60);\r\nlbl.textContent='Recording Time That Fits';\r\nval.textContent=hrs+' h '+mn+' min';\r\nsub.textContent=brDisp+' \\u2022 '+this.fmt(gb)+' GB available';\r\n}\r\nthis.renderCodecCompare();\r\n},\r\n\r\nrenderCodecCompare:function(){\r\nvar tbody=this.el('dss-codec-cmp');\r\nif(!tbody)return;\r\nvar type=this.el('dss-media-type').value;\r\nif(type!=='video'){\r\ntbody.innerHTML='<tr><td colspan=\"4\">Codec comparison applies to video. Switch Media Type to Video to compare H.264, H.265 and AV1.<\/td><\/tr>';\r\nreturn;\r\n}\r\nvar mode=this.el('dss-media-mode').value;\r\nvar key=this.el('dss-vres').value;\r\nvar mins=this.num('dss-dur');\r\nvar gb=this.num('dss-store');\r\nvar order=['h264','h265','av1'];\r\nvar baseBytes=0,i,j,html='';\r\n\/* find h264 baseline for the same resolution key *\/\r\nvar h264list=VIDEO_BITRATES.h264;\r\nfor(j=0;j<h264list.length;j++){if(h264list[j].k===key){baseBytes=h264list[j].br*1e6*mins*60\/8;break;}}\r\nfor(i=0;i<order.length;i++){\r\nvar c=order[i];\r\nvar list=VIDEO_BITRATES[c];\r\nvar br=0;\r\nfor(j=0;j<list.length;j++){if(list[j].k===key){br=list[j].br;break;}}\r\nif(br===0)continue;\r\nvar bps=br*1e6;\r\nvar cell,saving;\r\nif(mode==='size'){\r\nvar bytes=bps*mins*60\/8;\r\ncell=this.humanIEC(bytes);\r\nsaving=(baseBytes>0&&c!=='h264')?('\\u2212'+Math.round((1-bytes\/baseBytes)*100)+'%'):'baseline';\r\n}else{\r\nvar secs=(gb*1e9*8)\/bps;\r\nvar hrs=Math.floor(secs\/3600), mn=Math.floor((secs%3600)\/60);\r\ncell=hrs+' h '+mn+' m';\r\nsaving=(c!=='h264')?'more time':'baseline';\r\n}\r\nvar isSel=(c===this.el('dss-codec').value);\r\nhtml+='<tr'+(isSel?' class=\"dss-best\"':'')+'>';\r\nhtml+='<td><strong>'+CODEC_NAMES[c]+'<\/strong><\/td>';\r\nhtml+='<td class=\"dss-mono\">'+br+' Mbps<\/td>';\r\nhtml+='<td class=\"dss-mono\">'+cell+'<\/td>';\r\nhtml+='<td>'+saving+'<\/td><\/tr>';\r\n}\r\ntbody.innerHTML=html;\r\n},\r\n\r\n\/* ---------- TAB 4: TRANSFER ---------- *\/\r\nbuildConnPresets:function(){\r\nvar box=this.el('dss-conn-presets');\r\nif(!box)return;\r\nvar self=this,h='',i;\r\nfor(i=0;i<CONN_PRESETS.length;i++){\r\nvar p=CONN_PRESETS[i];\r\nh+='<button type=\"button\" class=\"dss-chip\" data-v=\"'+p.v+'\" data-u=\"'+p.u+'\" data-eff=\"'+p.eff+'\">'+p.label+'<\/button>';\r\n}\r\nbox.innerHTML=h;\r\nvar chips=box.querySelectorAll('.dss-chip');\r\nfor(i=0;i<chips.length;i++){\r\nchips[i].addEventListener('click',function(){\r\nself.el('dss-speed').value=this.getAttribute('data-v');\r\nself.el('dss-speed-unit').value=this.getAttribute('data-u');\r\nself.el('dss-overhead').value=this.getAttribute('data-eff');\r\nvar all=box.querySelectorAll('.dss-chip'),j;\r\nfor(j=0;j<all.length;j++)all[j].classList.remove('dss-on');\r\nthis.classList.add('dss-on');\r\nself.calcTransfer();\r\n});\r\n}\r\n},\r\n\r\nfmtDuration:function(totalSec){\r\nif(!isFinite(totalSec)||totalSec<=0)return '--';\r\nif(totalSec<1)return 'under 1 second';\r\nvar d=Math.floor(totalSec\/86400);\r\nvar h=Math.floor((totalSec%86400)\/3600);\r\nvar m=Math.floor((totalSec%3600)\/60);\r\nvar s=Math.floor(totalSec%60);\r\nvar out='';\r\nif(d>0)out+=d+'d ';\r\nif(d>0||h>0)out+=h+'h ';\r\nif(d>0||h>0||m>0)out+=m+'m ';\r\nout+=s+'s';\r\nreturn out;\r\n},\r\n\r\ncalcTransfer:function(){\r\nvar size=this.num('dss-file-size');\r\nvar sUnit=this.el('dss-file-unit').value;\r\nvar mult={mb:1e6,gb:1e9,tb:1e12};\r\nvar bytes=size*(mult[sUnit]||1e6);\r\n\r\nvar speed=this.num('dss-speed');\r\nvar spUnit=this.el('dss-speed-unit').value;\r\nvar spMult={kbps:1000,mbps:1e6,gbps:1e9};\r\nvar bitsPerSec=speed*(spMult[spUnit]||1e6);\r\n\r\nvar eff=this.num('dss-overhead');\r\nif(eff<=0)eff=100;\r\nif(eff>100)eff=100;\r\n\r\nvar idealSec=bitsPerSec>0?(bytes*8\/bitsPerSec):0;\r\nvar realSec=idealSec\/(eff\/100);\r\n\r\nvar mbps=bitsPerSec\/1e6;\r\nvar mbPerSec=bitsPerSec\/8\/1e6;\r\nvar realMbPerSec=mbPerSec*(eff\/100);\r\n\r\nthis.el('dss-time-real').textContent=this.fmtDuration(realSec);\r\nthis.el('dss-time-ideal').textContent='Ideal '+this.fmtDuration(idealSec)+' \\u2022 '+this.fmt(mbps)+' Mbps = '+this.fmt(mbPerSec)+' MB\/s theoretical, '+this.fmt(realMbPerSec)+' MB\/s realistic';\r\n},\r\n\r\n\/* ---------- TAB 5: BANDWIDTH ---------- *\/\r\ncalcBandwidth:function(){\r\nvar v=this.num('dss-visitors');\r\nvar p=this.num('dss-pages');\r\nvar w=this.num('dss-weight');\r\nvar cache=this.num('dss-cache-hit');\r\nvar growth=this.num('dss-growth');\r\nif(cache<0)cache=0;\r\nif(cache>95)cache=95;\r\n\r\nvar pageviews=v*p;\r\nvar rawMB=pageviews*w;\r\nvar afterCacheMB=rawMB*(1-cache\/100);\r\nvar withGrowthMB=afterCacheMB*(1+growth\/100);\r\n\r\nvar rawBytes=withGrowthMB*1e6;\r\nthis.el('dss-bw-val').textContent=this.humanSI(rawBytes);\r\nthis.el('dss-bw-sub').textContent=this.fmt(pageviews)+' pageviews\/month \\u2022 includes '+this.fmt(growth)+'% headroom';\r\n\r\nvar perDayBytes=rawBytes\/30;\r\nvar avgMbps=(rawBytes*8)\/(30*24*3600)\/1e6;\r\n\r\nvar rows=[\r\n['Total pageviews \/ month',this.fmt(pageviews)],\r\n['Raw transfer (no cache)',this.humanSI(rawMB*1e6)],\r\n['After '+this.fmt(cache)+'% cache hit',this.humanSI(afterCacheMB*1e6)],\r\n['With '+this.fmt(growth)+'% headroom',this.humanSI(rawBytes)],\r\n['Average per day',this.humanSI(perDayBytes)],\r\n['Sustained average bandwidth',this.fmt(avgMbps)+' Mbps']\r\n];\r\nvar html='',i;\r\nfor(i=0;i<rows.length;i++){\r\nhtml+='<tr><td>'+rows[i][0]+'<\/td><td class=\"dss-mono\">'+rows[i][1]+'<\/td><\/tr>';\r\n}\r\nthis.el('dss-bw-tbl').innerHTML=html;\r\n},\r\n\r\nrecalcAll:function(){\r\nthis.calcCapacity();\r\nthis.calcImage();\r\nthis.calcMedia();\r\nthis.calcTransfer();\r\nthis.calcBandwidth();\r\n},\r\n\r\nloadSample:function(){\r\nthis.el('dss-cap-val').value=1;\r\nthis.el('dss-cap-unit').value='tb';\r\nthis.applyStd('both');\r\nthis.el('dss-img-w').value=3840;\r\nthis.el('dss-img-h').value=2160;\r\nthis.el('dss-img-depth').value='24';\r\nthis.el('dss-media-type').value='video';\r\nthis.el('dss-media-mode').value='size';\r\nthis.el('dss-codec').value='h265';\r\nthis.fillVideoRes();\r\nthis.el('dss-vres').value='2160p30';\r\nthis.el('dss-dur').value=90;\r\nthis.el('dss-file-size').value=5;\r\nthis.el('dss-file-unit').value='gb';\r\nthis.el('dss-speed').value=100;\r\nthis.el('dss-speed-unit').value='mbps';\r\nthis.el('dss-overhead').value=80;\r\nthis.el('dss-visitors').value=50000;\r\nthis.el('dss-pages').value=3;\r\nthis.el('dss-weight').value=2.5;\r\nthis.toggleMediaUI();\r\nthis.recalcAll();\r\nthis.toast('Sample loaded: 1 TB drive, 4K frame, 90 min 4K HEVC film','ok');\r\n},\r\n\r\nresetAll:function(){\r\nthis.el('dss-cap-val').value=1;\r\nthis.el('dss-cap-unit').value='byte';\r\nthis.applyStd('both');\r\nthis.el('dss-img-w').value=1920;\r\nthis.el('dss-img-h').value=1080;\r\nthis.el('dss-img-depth').value='24';\r\nthis.el('dss-media-type').value='video';\r\nthis.el('dss-media-mode').value='size';\r\nthis.el('dss-codec').value='h264';\r\nthis.fillVideoRes();\r\nthis.el('dss-vres').value='1080p30';\r\nthis.el('dss-dur').value=60;\r\nthis.el('dss-store').value=128;\r\nthis.el('dss-file-size').value=5;\r\nthis.el('dss-file-unit').value='gb';\r\nthis.el('dss-speed').value=100;\r\nthis.el('dss-speed-unit').value='mbps';\r\nthis.el('dss-overhead').value=80;\r\nthis.el('dss-visitors').value=10000;\r\nthis.el('dss-pages').value=3;\r\nthis.el('dss-weight').value=2.5;\r\nthis.el('dss-cache-hit').value=0;\r\nthis.el('dss-growth').value=30;\r\nvar w=this.el('pth-dss-wrapper');\r\nvar chips=w.querySelectorAll('.dss-chip'),i;\r\nfor(i=0;i<chips.length;i++)chips[i].classList.remove('dss-on');\r\nthis.toggleMediaUI();\r\nthis.recalcAll();\r\nthis.toast('Reset to defaults','ok');\r\n},\r\n\r\nbindEvents:function(){\r\nvar self=this;\r\nvar w=this.el('pth-dss-wrapper');\r\nif(!w||w.getAttribute('data-bound')==='1')return;\r\nw.setAttribute('data-bound','1');\r\n\r\nvar i,tabs=w.querySelectorAll('.dss-tab');\r\nfor(i=0;i<tabs.length;i++){\r\ntabs[i].addEventListener('click',function(){self.switchTab(this.getAttribute('data-tab'));});\r\n}\r\nvar stds=w.querySelectorAll('.dss-std-btn');\r\nfor(i=0;i<stds.length;i++){\r\nstds[i].addEventListener('click',function(){self.applyStd(this.getAttribute('data-std'));});\r\n}\r\n\r\nthis.el('dss-cap-val').addEventListener('input',function(){self.calcCapacity();});\r\nthis.el('dss-cap-unit').addEventListener('change',function(){self.calcCapacity();});\r\n\r\nthis.el('dss-img-w').addEventListener('input',function(){self.calcImage();});\r\nthis.el('dss-img-h').addEventListener('input',function(){self.calcImage();});\r\nthis.el('dss-img-depth').addEventListener('change',function(){self.calcImage();});\r\n\r\nthis.el('dss-media-type').addEventListener('change',function(){self.toggleMediaUI();});\r\nthis.el('dss-media-mode').addEventListener('change',function(){self.toggleMediaUI();});\r\nthis.el('dss-codec').addEventListener('change',function(){self.fillVideoRes();});\r\nthis.el('dss-vres').addEventListener('change',function(){self.syncBitrateFromPreset();});\r\nthis.el('dss-ares').addEventListener('change',function(){self.syncBitrateFromPreset();});\r\nthis.el('dss-bitrate').addEventListener('input',function(){self.calcMedia();});\r\nthis.el('dss-dur').addEventListener('input',function(){self.calcMedia();});\r\nthis.el('dss-store').addEventListener('input',function(){self.calcMedia();});\r\n\r\nthis.el('dss-file-size').addEventListener('input',function(){self.calcTransfer();});\r\nthis.el('dss-file-unit').addEventListener('change',function(){self.calcTransfer();});\r\nthis.el('dss-speed').addEventListener('input',function(){self.calcTransfer();});\r\nthis.el('dss-speed-unit').addEventListener('change',function(){self.calcTransfer();});\r\nthis.el('dss-overhead').addEventListener('input',function(){self.calcTransfer();});\r\n\r\nthis.el('dss-visitors').addEventListener('input',function(){self.calcBandwidth();});\r\nthis.el('dss-pages').addEventListener('input',function(){self.calcBandwidth();});\r\nthis.el('dss-weight').addEventListener('input',function(){self.calcBandwidth();});\r\nthis.el('dss-cache-hit').addEventListener('input',function(){self.calcBandwidth();});\r\nthis.el('dss-growth').addEventListener('input',function(){self.calcBandwidth();});\r\n\r\nthis.el('dss-sample').addEventListener('click',function(){self.loadSample();});\r\nthis.el('dss-clear').addEventListener('click',function(){self.resetAll();});\r\nthis.el('dss-fw').addEventListener('click',function(){\r\nvar g=self.el('dss-grid');\r\ng.classList.toggle('dss-fw');\r\nthis.textContent=g.classList.contains('dss-fw')?'Restore Sidebar':'Full Width';\r\n});\r\n},\r\n\r\ninit:function(){\r\nthis.bindEvents();\r\nthis.buildImgPresets();\r\nthis.buildConnPresets();\r\nthis.fillVideoRes();\r\nthis.fillAudioRes();\r\nthis.applyStd('both');\r\nthis.toggleMediaUI();\r\nthis.recalcAll();\r\n}\r\n};\r\n\r\nfunction pthDSSInit(){\r\nif(!window.pthDataStudioApp.initialized&&document.getElementById('pth-dss-wrapper')){\r\nwindow.pthDataStudioApp.initialized=true;\r\nwindow.pthDataStudioApp.init();\r\n}\r\n}\r\npthDSSInit();\r\nif(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',pthDSSInit);}\r\nwindow.addEventListener('load',function(){setTimeout(pthDSSInit,50);});\r\nif(!window.pthDataStudioApp.initialized&&typeof MutationObserver!=='undefined'){\r\nvar dssObs=new MutationObserver(function(){\r\nif(document.getElementById('pth-dss-wrapper')){dssObs.disconnect();pthDSSInit();}\r\n});\r\ndssObs.observe(document.body||document.documentElement,{childList:true,subtree:true});\r\nsetTimeout(function(){dssObs.disconnect();},10000);\r\n}\r\n})();\r\n<\/script>\n\n\n\n\n<style>\n.pth-feature-wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-bottom:40px}\n.pth-feat-box{border:1px solid #e2e8f0;background:#fff;padding:24px;border-radius:12px;box-shadow:0 4px 6px -1px rgba(0,0,0,0.02);transition:all .3s ease}\n.pth-feat-box:hover{border-color:#bfdbfe;transform:translateY(-3px);box-shadow:0 10px 15px -3px rgba(0,0,0,0.05)}\n.pth-feat-title{font-size:1.05rem;font-weight:800;color:#0f172a;margin:0 0 10px;display:flex;align-items:center;gap:10px}\n.pth-feat-text{font-size:.9rem;color:#1e293b;line-height:1.6;margin:0;font-weight:500}\n.pth-steps-wrap{border:1px solid #e2e8f0;background:#fff;padding:40px 30px;border-radius:16px;text-align:center;box-shadow:0 4px 6px -1px rgba(0,0,0,0.02);margin-bottom:40px;width:100%;box-sizing:border-box}\n.pth-steps-title{font-size:1.2rem;font-weight:800;color:#0f172a;text-transform:uppercase;margin:0 0 35px;letter-spacing:1px}\n.pth-steps-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:30px}\n.pth-step-item{display:flex;flex-direction:column;align-items:center}\n.pth-step-num{width:45px;height:45px;background:#2563eb;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:1.2rem;margin-bottom:15px;box-shadow:0 4px 10px rgba(37,99,235,.3)}\n.pth-step-name{font-weight:800;color:#0f172a;margin:0 0 8px;font-size:1rem}\n.pth-step-desc{font-size:.9rem;color:#1e293b;line-height:1.5;margin:0;font-weight:500}\n<\/style>\n<div class=\"pth-feature-wrap\">\n  <div class=\"pth-feat-box\">\n    <p class=\"pth-feat-title\"><span aria-hidden=\"true\">\ud83d\udfe2<\/span> SI and IEC, Side by Side<\/p>\n    <p class=\"pth-feat-text\">Most converters quietly divide by 1024 and print &quot;KB&quot; on the result. That is wrong \u2014 1024 bytes is a KiB. This tool shows both columns at once: SI decimal (\u00f71000, what drive makers and ISPs use) and IEC binary (\u00f71024, what your operating system reports). It is the only honest way to answer why a 1 TB drive shows up as 931 GB.<\/p>\n  <\/div>\n  <div class=\"pth-feat-box\">\n    <p class=\"pth-feat-title\"><span aria-hidden=\"true\">\ud83d\udd35<\/span> Real Codec Bitrates, Not Guesses<\/p>\n    <p class=\"pth-feat-text\">The Media Storage tab carries 27 video presets across H.264, H.265 and AV1 \u2014 from 480p30 up to 8K \u2014 plus 10 audio presets from 64 kbps podcast mono to 1411 kbps WAV. Pick a codec and resolution and the bitrate fills itself in, then a comparison table shows the same clip encoded all three ways so the saving is visible rather than theoretical.<\/p>\n  <\/div>\n  <div class=\"pth-feat-box\">\n    <p class=\"pth-feat-title\"><span aria-hidden=\"true\">\ud83d\udfe3<\/span> Transfer Times That Admit Reality<\/p>\n    <p class=\"pth-feat-text\">A 100 Mbps line does not move 100 Mbps of your file. Between TCP overhead, congestion and Wi-Fi loss, 80% is a realistic figure. The Transfer tab shows the honest number alongside the theoretical one, and the Bandwidth Planner turns monthly visitors and page weight into the GB figure your host will actually bill you for.<\/p>\n  <\/div>\n<\/div>\n \n<div class=\"pth-steps-wrap\">\n  <p class=\"pth-steps-title\">How to Use Data Size &amp; Bandwidth Studio<\/p>\n  <div class=\"pth-steps-grid\">\n    <div class=\"pth-step-item\">\n      <div class=\"pth-step-num\" aria-hidden=\"true\">1<\/div>\n      <p class=\"pth-step-name\">Pick Your Tab<\/p>\n      <p class=\"pth-step-desc\">Five calculators sit behind five tabs: unit conversion, raw image size, media storage by codec, transfer time, and monthly bandwidth planning. Load Sample fills everything with a worked example.<\/p>\n    <\/div>\n    <div class=\"pth-step-item\">\n      <div class=\"pth-step-num\" aria-hidden=\"true\">2<\/div>\n      <p class=\"pth-step-name\">Enter Your Numbers<\/p>\n      <p class=\"pth-step-desc\">Type a value or click a preset chip \u2014 HD through 8K for images, ADSL through 1 Gbps fibre for connections. Results update on every keystroke; nothing needs a Calculate button.<\/p>\n    <\/div>\n    <div class=\"pth-step-item\">\n      <div class=\"pth-step-num\" aria-hidden=\"true\">3<\/div>\n      <p class=\"pth-step-name\">Read Both Standards<\/p>\n      <p class=\"pth-step-desc\">In the Capacity tab, use the Show Both \/ SI \/ IEC toggle. Show Both is the default and is what you want whenever a drive size or an OS reading is involved.<\/p>\n    <\/div>\n    <div class=\"pth-step-item\">\n      <div class=\"pth-step-num\" aria-hidden=\"true\">4<\/div>\n      <p class=\"pth-step-name\">Compare and Decide<\/p>\n      <p class=\"pth-step-desc\">The codec table shows the same footage across H.264, H.265 and AV1 with the percentage saving. The bandwidth table breaks monthly transfer down by cache hit rate and growth headroom.<\/p>\n    <\/div>\n  <\/div>\n<\/div>\n \n\n\n\n<p class=\"wp-block-paragraph\">Last updated: July 2026<\/p>\n\n\n\n<h2 id=\"\ud83d\udd34-your-1-tb-drive-is-not-missing-69-gb\" class=\"wp-block-heading\">\ud83d\udd34&nbsp;<strong>Your 1 TB Drive Is Not Missing 69 GB<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Buy a 1 TB hard drive, plug it in, and Windows tells you it holds 931 GB. Nothing has been stolen, the drive is not faulty, and the manufacturer has not lied to you. Two different definitions of &#8220;giga&#8221; are being used in the same sentence, and nobody involved bothers to say which.<\/p>\n\n\n<figure class=\"pth-article-figure pth-img-left\" style=\"float:left; width:700px; max-width:100%; margin:4px 28px 16px 0; clear:left;\"><img decoding=\"async\" src=\"https:\/\/schoolict.net\/tools\/wp-content\/uploads\/2026\/07\/si-vs-iec-1tb-drive-800x447.jpeg\" alt=\"Diagram showing 1 TB equals 1,000,000,000,000 bytes in SI but displays as 931 GiB in Windows\" width=\"700\" height=\"394\" loading=\"lazy\" data-no-lazy=\"1\" class=\"pth-article-img\" style=\"width:100%;height:auto;display:block;border-radius:10px;border:1px solid #e2e8f0;\"><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The drive maker uses the SI decimal standard, where each prefix is a power of 1000. So 1 TB means exactly 1,000,000,000,000 bytes. That is what you bought and that is what is on the platter. Your operating system, meanwhile, divides by 1024 \u2014 because computers address memory in powers of two \u2014 and then prints the label &#8220;GB&#8221; on the answer anyway. Divide 1,000,000,000,000 by 1024 three times and you get 931.32. Windows calls that 931 GB. It is really 931 GiB, gibibytes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both numbers describe exactly the same bytes. The gap is purely a labelling failure. The IEC standardised the fix in 1998: KiB, MiB, GiB, and TiB for the binary powers, leaving KB, MB, GB, and TB for the decimal ones. Linux tools and macOS adopted it; Windows never did, which is why the confusion has outlived an entire generation of hardware. That is why the Capacity tab here shows both columns by default rather than quietly picking one and hoping you do not notice.<\/p>\n\n\n\n<h3 id=\"\ud83d\udfe2-when-the-difference-actually-bites\" class=\"wp-block-heading\">\ud83d\udfe2&nbsp;<strong>When the Difference Actually Bites<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\ud83d\udd35\u00a0<strong>Buying storage.<\/strong>\u00a0The gap widens as capacity grows. A KiB is 2.4% larger than a KB, but a TiB is a full 10% larger than a TB. On a 16 TB NAS that works out to about 1.45 TB of &#8220;missing&#8221; space you should have expected.<\/li>\n\n\n\n<li>\ud83d\udfe0\u00a0<strong>Sizing an upload limit.<\/strong>\u00a0If your server config says a 10 MB max and your validation code checks against 10 \u00d7 1024 \u00d7 1024, you have actually allowed 10.49 MB. Usually harmless, occasionally not.<\/li>\n\n\n\n<li>\ud83d\udfe3\u00a0<strong>Network speeds.<\/strong>\u00a0Bandwidth is always SI. A 100 Mbps connection is 100,000,000 bits per second, never 104,857,600. Mixing standards here produces transfer estimates that are wrong by about 5%.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"\ud83d\udfe1-raw-image-size-and-why-nothing-is-ever-that-big\" class=\"wp-block-heading\">\ud83d\udfe1&nbsp;<strong>Raw Image Size, and Why Nothing Is Ever That Big<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The raw image maths is refreshingly simple: width \u00d7 height \u00d7 bits per pixel \u00f7 8. A 1920\u00d71080 image at 24-bit colour is 1920 \u00d7 1080 \u00d7 24 \u00f7 8 = 6,220,800 bytes, or about 5.93 MiB. That is the number the Raw Image tab gives you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But no photo on your phone is 5.93 MiB per frame. Compression is why. The raw figure describes an&nbsp;<em>uncompressed bitmap<\/em>&nbsp;\u2014 every pixel stored explicitly, with no attempt to exploit the fact that adjacent pixels in a real photograph are usually similar. JPEG and WebP throw away detail the eye tends not to notice; PNG keeps everything but encodes it more cleverly. The estimate table underneath shows realistic ranges: a photographic WebP typically lands at 2\u20134% of raw, JPEG at 3\u20136%, PNG at 30\u201360% because lossless compression can only do so much with photographic noise.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So what is the raw number good for? Three things. It tells you how much RAM the decoded image occupies while your browser or editor is holding it \u2014 which is the raw figure, not the compressed one, and it is why opening thirty 24 MP photos at once can exhaust memory. It sets an upper bound for uncompressed formats like BMP and TIFF. And it lets you sanity-check a compression ratio: if a tool claims to have compressed a photo to 0.1% of raw, something has been destroyed. To actually perform the compression rather than estimate it, use the&nbsp;<a href=\"https:\/\/schoolict.net\/tools\/free-advanced-image-studio-pro\/\">Advanced Image Studio Pro<\/a>.<\/p>\n\n\n\n<h2 id=\"\ud83d\udd34-h-264-h-265-and-av-1-what-the-bitrates-actually-cost-you\" class=\"wp-block-heading\">\ud83d\udd34&nbsp;<strong>H.264, H.265 and AV1: What the Bitrates Actually Cost You<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Video file size is bitrate \u00d7 duration \u00f7 8. The interesting question is which bitrate, and that depends entirely on the codec \u2014 because a newer codec reaches the same visual quality at a lower bitrate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For one hour of 1080p30, the tool&#8217;s presets give you roughly this:&nbsp;<strong>H.264 at 8 Mbps produces about 3.6 GB. H.265 at 4 Mbps produces about 1.8 GB. AV1 at 2.9 Mbps produces about 1.3 GB.<\/strong>&nbsp;Same footage, same apparent quality, and the AV1 file is roughly a third the size of the H.264 one. Scale that to a 4K archive and the difference becomes a hard drive.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The catch is that none of this is free.&nbsp;<strong>H.264 \/ AVC<\/strong>&nbsp;is the safe default: it plays on every device made in the last fifteen years, encodes fast, and is hardware-accelerated everywhere.&nbsp;<strong>H.265 \/ HEVC<\/strong>&nbsp;roughly halves the bitrate but carries a messy patent-licensing situation, which is precisely why browser support for it is inconsistent.&nbsp;<strong>AV1<\/strong>&nbsp;is royalty-free and compresses best of the three, but encoding is slow, and smooth playback wants recent hardware \u2014 older phones will decode it in software and drain the battery doing it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Worth saying plainly: the bitrates in this tool are typical targets, not standards. A static talking-head interview compresses far better than a handheld shot of rain on a moving car, and encoder settings shift the result substantially. Treat the output as a planning figure, not a promise. Once you have decided on a target, the&nbsp;<a href=\"https:\/\/schoolict.net\/tools\/turbo-video-editor\/\">Video Studio<\/a>&nbsp;handles the actual conversion, and the&nbsp;<a href=\"https:\/\/schoolict.net\/tools\/free-all-in-one-audio-editor-converter\/\">Audio Studio<\/a>&nbsp;covers MP3 bitrate re-encoding.<\/p>\n\n\n\n<h3 id=\"\ud83d\udfe2-the-reverse-question-how-much-fits\" class=\"wp-block-heading\">\ud83d\udfe2&nbsp;<strong>The Reverse Question: How Much Fits?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Switch the Media tab from &#8220;Duration to File Size&#8221; to &#8220;Storage to Duration&#8221; and it answers the question people actually ask before a shoot: how many hours fit on this card? A 128 GB card recording 4K at H.265 (18 Mbps) holds roughly 15 hours 48 minutes. The same card recording 4K H.264 at 35 Mbps holds about 8 hours. The codec choice literally doubles your card.<\/p>\n\n\n\n<h2 id=\"\ud83d\udfe1-mbps-is-not-mb-s-and-100-never-happens\" class=\"wp-block-heading\">\ud83d\udfe1&nbsp;<strong>Mbps Is Not MB\/s, and 100% Never Happens<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Internet speeds are sold in mega<em>bits<\/em>. Files are measured in mega<em>bytes<\/em>. Eight bits to a byte, so a 100 Mbps connection can move at most 12.5 MB per second. That factor of eight is the single most common mistake in this whole subject, and it makes people think their connection is broken when it is behaving exactly as advertised.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then reality takes another cut. TCP has packet overhead. Wi-Fi loses frames and retransmits. The server on the other end has its own limits. Your neighbours are streaming. Nobody sustains their rated line speed, which is why this tool has an efficiency field instead of pretending otherwise. About 80% is a fair default for a typical home connection, 90\u201395% for a wired fibre link, and 70% or lower for mobile. A 5 GB download over 100 Mbps takes 6 minutes 40 seconds in theory \u2014 and about 8 minutes 20 seconds at 80% efficiency, which is the figure worth planning around.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Bandwidth Planner tab applies the same honesty to hosting. Multiply monthly visitors by pages per visit by average page weight and you get raw transfer. Then subtract whatever a CDN serves on your behalf (the cache hit rate), and add headroom for growth, because getting throttled or billed for an overage in your best traffic month is a miserable way to learn this lesson. If your pages are heavier than you would like, the&nbsp;<a href=\"https:\/\/schoolict.net\/tools\/free-offline-pagespeed-code-analyzer\/\">PageSpeed Code Analyzer<\/a>&nbsp;will show you what is inflating them.<\/p>\n\n\n\n\n<style>\n.pth-faq-section{margin-top:50px;margin-bottom:40px;font-family:inherit}\n.pth-faq-header{font-size:1.8rem;font-weight:800;color:#0f172a;margin-bottom:25px;border-bottom:2px solid #e2e8f0;padding-bottom:10px;display:flex;align-items:center;gap:10px}\n.pth-faq-grid{display:grid;grid-template-columns:100%;gap:20px}\n@media(min-width:768px){.pth-faq-grid{grid-template-columns:repeat(2,1fr)}}\n@media(min-width:1024px){.pth-faq-grid{grid-template-columns:repeat(3,1fr)}}\n.pth-faq-card{background:#f8fafc;padding:24px;border-radius:12px;border:1px solid #e2e8f0;transition:transform .2s ease;break-inside:avoid}\n.pth-faq-card:hover{transform:translateY(-3px);box-shadow:0 4px 12px rgba(0,0,0,.05)}\n.pth-faq-q{color:#0f172a;font-size:1rem;font-weight:700;margin:0 0 12px;line-height:1.4}\n.pth-faq-a{margin:0;font-size:.95rem;color:#1e293b;line-height:1.6;font-weight:500}\n<\/style>\n<div class=\"pth-faq-section\">\n  <div class=\"pth-faq-header\"><span aria-hidden=\"true\">\u2753<\/span> Frequently Asked Questions<\/div>\n  <div class=\"pth-faq-grid\">\n    <div class=\"pth-faq-card\">\n      <p class=\"pth-faq-q\">Why does my 1 TB drive show as 931 GB?<\/p>\n      <p class=\"pth-faq-a\">Because the manufacturer sells 1 TB as 1,000,000,000,000 bytes (SI), while Windows divides by 1024 three times and still writes &quot;GB&quot; on the result. That result is really 931 GiB. The bytes are all there \u2014 only the label is wrong.<\/p>\n    <\/div>\n    <div class=\"pth-faq-card\">\n      <p class=\"pth-faq-q\">Which should I use, SI or IEC?<\/p>\n      <p class=\"pth-faq-a\">Use SI for drive capacities, network speeds and anything you buy or sell. Use IEC for what an operating system reports and for memory allocation. When comparing a purchase against an OS reading, keep Show Both switched on.<\/p>\n    <\/div>\n    <div class=\"pth-faq-card\">\n      <p class=\"pth-faq-q\">Why is my real photo far smaller than the raw size shown?<\/p>\n      <p class=\"pth-faq-a\">The raw figure is an uncompressed bitmap \u2014 every pixel stored explicitly. JPEG and WebP typically reduce a photo to a few percent of that. The raw number still matters: it is roughly the RAM the decoded image occupies while open.<\/p>\n    <\/div>\n    <div class=\"pth-faq-card\">\n      <p class=\"pth-faq-q\">Are the codec bitrates exact?<\/p>\n      <p class=\"pth-faq-a\">No, and no honest tool would claim otherwise. They are typical streaming and recording targets. Real output depends on motion, grain, and encoder settings \u2014 a static interview compresses far better than handheld action footage. Treat them as planning figures.<\/p>\n    <\/div>\n    <div class=\"pth-faq-card\">\n      <p class=\"pth-faq-q\">Should I just use AV1 for everything, since it is smallest?<\/p>\n      <p class=\"pth-faq-a\">Only if your audience can play it. AV1 encodes slowly and needs fairly recent hardware to decode efficiently \u2014 older phones fall back to software decoding and burn battery. H.264 remains the safe universal choice; AV1 wins for archival and modern streaming.<\/p>\n    <\/div>\n    <div class=\"pth-faq-card\">\n      <p class=\"pth-faq-q\">Why is my download slower than the calculator&#8217;s ideal time?<\/p>\n      <p class=\"pth-faq-a\">Because no connection sustains its rated speed. TCP overhead, Wi-Fi retransmission, congestion and server-side limits all take a cut. Set the efficiency field to about 80% for a typical home line, or lower for mobile, and the estimate becomes realistic.<\/p>\n    <\/div>\n    <div class=\"pth-faq-card\">\n      <p class=\"pth-faq-q\">What cache hit rate should I use in the Bandwidth Planner?<\/p>\n      <p class=\"pth-faq-a\">If you have no CDN, use 0 \u2014 every byte comes from your host. With Cloudflare or similar in front of a typical site, a large share of static assets is served at the edge. Check your CDN dashboard for the real figure rather than guessing.<\/p>\n    <\/div>\n    <div class=\"pth-faq-card\">\n      <p class=\"pth-faq-q\">Is anything I type here sent to a server?<\/p>\n      <p class=\"pth-faq-a\">No. Every calculation runs in your browser as plain JavaScript. There are no uploads, no accounts, and no network requests after the page loads \u2014 you can disconnect and the tool keeps working.<\/p>\n    <\/div>\n  <\/div>\n<\/div>\n \n","protected":false},"excerpt":{"rendered":"<p>Data Size &#038; Bandwidth Studio Instantly calculate data capacity, image file sizes, and download times offline. Convert between Bits, Bytes, KB, MB, GB, and TB with precision. \ud83d\udfe2 SI and IEC, Side by Side Most converters quietly divide by 1024 and print &quot;KB&quot; on the result. That is wrong \u2014 1024 bytes is a KiB. &#8230; <a title=\"Data Capacity Calculator | Storage, Codec &amp; Transfer Calculator\" class=\"read-more\" href=\"https:\/\/schoolict.net\/tools\/data-capacity-calculator-image-size\/\" aria-label=\"Read more about Data Capacity Calculator | Storage, Codec &amp; Transfer Calculator\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":3478,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-795","page","type-page","status-publish","has-post-thumbnail"],"_links":{"self":[{"href":"https:\/\/schoolict.net\/tools\/wp-json\/wp\/v2\/pages\/795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/schoolict.net\/tools\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/schoolict.net\/tools\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/schoolict.net\/tools\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/schoolict.net\/tools\/wp-json\/wp\/v2\/comments?post=795"}],"version-history":[{"count":3,"href":"https:\/\/schoolict.net\/tools\/wp-json\/wp\/v2\/pages\/795\/revisions"}],"predecessor-version":[{"id":6700,"href":"https:\/\/schoolict.net\/tools\/wp-json\/wp\/v2\/pages\/795\/revisions\/6700"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/schoolict.net\/tools\/wp-json\/wp\/v2\/media\/3478"}],"wp:attachment":[{"href":"https:\/\/schoolict.net\/tools\/wp-json\/wp\/v2\/media?parent=795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}