Image File Size Calculator
Work out photo file size from pixel dimensions, bit depth, channels and compression — plus how many fit on a card and what a shoot will need.
Image File Size Calculator
Background.
This calculator answers the question a camera's own display never quite does: how big will these files be, and will they fit? It works from pixel dimensions, bit depth, channel count and a compression ratio, and it reports the uncompressed size alongside the stored size so the compression is visible rather than implied. It is not a download-time calculator — it produces a file size from parameters rather than taking one as an input.
The uncompressed part is a definition, not an estimate. An image is width × height × channels × bit depth bits, divided by eight to get bytes. There is nothing to look up. The trap is the channel count: a JPEG or a TIFF has three channels because it stores a red, green and blue value for every pixel, but a Bayer raw file has only one, because the sensor records a single value per photosite and the demosaic that invents the other two happens later, in software. Set channels to 3 for a raw file and you will overstate the uncompressed size by a factor of three, and any compression ratio you derive from it will be nonsense.
The compressed part is genuinely uncertain, which is why compression ratio is an input on this page rather than a hidden table. How well a codec does depends on the codec, the quality setting, and — most of all — the picture. A frame of clear blue sky and a frame of autumn woodland from the same camera at the same setting can differ by more than two to one, and Canon's own file-size table carries the footnote "file size, number of possible shots, and maximum burst vary depending on shooting conditions". What this page can do is give you real anchors instead of folklore. Canon publishes, for the 20.1 MP EOS R6 at 5472 × 3648: JPEG Large Fine 7.1 MB, JPEG Large Normal 3.9 MB, RAW 21.8 MB and C-RAW 11.2 MB. Divide those into the corresponding uncompressed bitmaps and the ratios fall out — 8.4:1, 15.4:1, 1.6:1 and 3.1:1 — and the compression-ratio mode on this page lets you do the same with a file from your own camera.
The third mode is the practical one. Give it a frame count and a card size and it returns the storage a shoot needs and the number of cards, using decimal gigabytes the way card manufacturers do. That is also why the results show both MB and MiB: a 64 GB card is 64 × 10⁹ bytes to the manufacturer and 59.6 GiB to your operating system, and neither is lying.
Below the widget you will find the identity written out, three worked examples computed by hand against Canon's published figures, why raw compression ratios above about two should make you suspicious, and an honest list of what the arithmetic leaves out.
What is image file size calculator?
An image file's size has two components: how much information the pixels represent, and how efficiently the format stores it. The first is exact. A digital image is a rectangular array of samples, each sample carrying a fixed number of bits per channel, so the information content is width × height × channels × bit depth bits — 19,961,856 pixels × 3 channels × 8 bits for a 20 MP RGB image, which is 478,884,544 bits or 59,885,568 bytes. That figure is what an uncompressed TIFF or BMP writes, and it is the denominator of every compression ratio. The second component is the codec. Lossless formats (PNG, TIFF with LZW or ZIP, lossless raw) reconstruct every original sample exactly and therefore achieve only what the image's own redundancy allows — typically 1.2 to 2 times on photographic content, which is why a lossless raw file compresses far less than people expect. Lossy formats (JPEG, HEIF, AVIF, JPEG XL in lossy mode) discard information the eye is unlikely to miss and can achieve ten or twenty times, at a quality cost that grows with the ratio. JPEG, standardised as ISO/IEC 10918-1, works by transforming 8 × 8 blocks into frequency coefficients, quantising them by an amount the quality setting controls, and entropy-coding the result — a process whose output size depends entirely on how much high-frequency detail the picture contains. That is the fundamental reason no calculator can predict a JPEG's size from its dimensions alone, and why this page asks you for a ratio or lets you measure one. Two conventions matter for the storage arithmetic. Card and drive capacities are decimal: a 64 GB card holds 64 × 10⁹ bytes. Operating systems and file managers usually count in binary, where a gibibyte is 2³⁰ bytes, so the same card shows as 59.6 GiB. NIST's guide to the SI covers both prefix families, and the difference — about 7 % at the gigabyte scale — is enough to matter when you are deciding whether a shoot fits.
How to use this calculator.
- Choose what you need. "File size" predicts a file from its parameters; "compression ratio" measures what your camera is really doing from a file you already have; "shoot storage" turns a frame count into cards.
- Enter the recorded pixel width and height. Take these from the camera's specification or from an existing file's properties, not from the marketing megapixel number, which is usually rounded and sometimes counts photosites that are never written out.
- Set the bit depth. JPEG is always 8 bits per channel. Most full-frame cameras record raw at 14 bits, many crop and older bodies at 12, and medium format at 16. HEIF stills are typically 10.
- Set the channel count carefully. Use 3 for RGB, 4 for RGBA or CMYK, and 1 for grayscale — and 1 for a Bayer raw file too. If you are computing a raw file's size and you chose 3, everything downstream will be wrong by a factor of three.
- For the file-size mode, enter a compression ratio. Use 1 for genuinely uncompressed output. For a camera JPEG at best quality, around 8 is a reasonable starting point derived from Canon's published table; for lossless raw, around 1.6.
- For the compression-ratio mode, enter the size of a real file from your camera instead. The calculator will tell you the ratio and the bits per pixel it implies — which is the most useful diagnostic on the page, because it is measured rather than assumed.
- For the shoot-storage mode, enter your frame count and card capacity. Then double the result if you shoot raw + JPEG, and double it again if you back up to a second drive in the field.
- Treat every storage figure as an upper bound. Filesystem overhead, the embedded JPEG preview inside every raw file, and metadata all take a slice, and the compression ratio itself moves with what you photograph.
The formula.
The uncompressed size is a definition:
B_unc = W × H × C × D / 8 bytes
For a 5472 × 3648 frame that is 19,961,856 pixels. At 3 channels and 8 bits each: 19,961,856 × 3 × 8 / 8 = 59,885,568 bytes = 59.885568 MB. The bits-per-pixel figure for an uncompressed file is then exactly C × D — 24 for 8-bit RGB — which is the arithmetic self-check built into this page.
Compression divides:
B = B_unc / R bpp = 8B / (W × H)
and the compression-ratio mode inverts it: R = B_unc / B_observed.
The ratios you can trust are the ones you derive from published figures rather than remember. Canon's EOS R6 specification lists, at 5472 × 3648: JPEG Large Fine 7.1 MB, JPEG Large Normal 3.9 MB, RAW 21.8 MB, C-RAW 11.2 MB. Working those out:
8-bit RGB uncompressed = 59.885568 MB ÷ 7.1 = 8.43 : 1 (2.85 bits per pixel) JPEG L Fine ÷ 3.9 = 15.36 : 1 (1.56 bits per pixel) JPEG L Normal
14-bit single-channel raw = 19,961,856 × 14 / 8 = 34,933,248 B = 34.933248 MB ÷ 21.8 = 1.60 : 1 RAW (lossless) ÷ 11.2 = 3.12 : 1 C-RAW (lossy)
Note what the raw line depends on. If you set channels to 3 instead of 1, the "uncompressed" raw figure becomes 104.8 MB and the implied ratio 4.8:1 — and a lossless ratio of 4.8 on photographic data is not achievable, which is how you know the channel count was wrong. A raw file holds one number per photosite; the other two colours per pixel are interpolated later.
Storage, finally:
images per card = ⌊ capacity_bytes / B ⌋ shoot storage = B × frames / 10⁹ GB
with capacities in decimal gigabytes because that is how they are sold. The results also show mebibytes, 2²⁰ bytes, because that is what most operating systems display when they write "MB".
What this leaves out: container overhead and metadata, which add tens of kilobytes to a JPEG and often one to several megabytes to a raw file thanks to the embedded full-size JPEG preview; chroma subsampling, which throws away colour resolution before JPEG's transform even runs, so "3 channels" overstates what the encoder is really given; and the dominant factor of all — picture content. Canon's own table is footnoted "file size, number of possible shots, and maximum burst vary depending on shooting conditions", and it is not being coy.
A worked example.
Take Canon's own published figure and see what it implies. The EOS R6 records 5472 × 3648, which Canon lists as approximately 20.1 effective megapixels, and its specification table gives a JPEG Large Fine file as 7.1 MB. Start with the bitmap: 5472 × 3648 = 19,961,856 pixels, and at 3 channels of 8 bits each that is 19,961,856 × 3 = 59,885,568 bytes, or 59.885568 MB — 57.11 MiB if your file manager counts in binary. The stored file is 7,100,000 bytes, so the compression ratio is 59,885,568 ÷ 7,100,000 = 8.4345870423 to one. In other words Canon's default JPEG discards about 88 % of the data. In bits per pixel that is 7,100,000 × 8 ÷ 19,961,856 = 2.845426798 bits, against the 24 an uncompressed 8-bit RGB pixel occupies — under three bits to describe a full-colour pixel, which is a fair summary of why JPEG changed photography. The storage consequences follow immediately: a 64 GB card holds ⌊64,000,000,000 ÷ 7,100,000⌋ = 9,014 of these frames, and a 500-frame session comes to 7,100,000 × 500 ÷ 10⁹ = 3.55 GB. Compare that with shooting the same session uncompressed, where the same card would hold 1,068 frames and the session would need 29.94 GB. Now try the raw line as a cross-check, because it is where people go wrong. Set the bit depth to 14, the channels to 1 and the actual size to Canon's published 21.8 MB. The uncompressed figure becomes 19,961,856 × 14 ÷ 8 = 34,933,248 bytes = 34.933248 MB, and the ratio is 1.6024425688 to one — a modest, believable number for lossless compression of photographic data. Had you left the channel count at 3, the calculator would have reported an uncompressed size of 104.8 MB and a lossless ratio of 4.8:1, which is not achievable and is the signal that the setting is wrong. A Bayer raw file stores one value per photosite; the missing two thirds of the colour information is invented by the demosaic later.
Frequently asked questions.
Why is my raw file so much smaller than the calculator's uncompressed figure?
Why does my 64 GB card show as 59.6 GB on my computer?
Can this predict how big my JPEGs will actually be?
What is a good bits-per-pixel figure?
Should I plan storage for raw + JPEG?
How does this differ from the download time calculator?
References& sources.
- [1]Canon Inc. EOS R6 Product Manual — Specifications. Source of every default and every compression anchor on this page. Gives the image sensor as 'Approx. 35.9×23.9 mm' with 'Max. approx. 20.1 megapixels' effective pixels, and the still-image file-size table at 5472×3648: JPEG Large (Fine) 7.1 MB, JPEG Large (Normal) 3.9 MB, RAW 21.8 MB, C-RAW 11.2 MB, with the caveat 'File size, number of possible shots, and maximum burst vary depending on shooting conditions.'
- [2]National Institute of Standards and Technology. NIST Special Publication 811, Guide for the Use of the International System of Units, Appendix B.9. The authority for the SI decimal prefixes used by storage manufacturers and for the IEC binary prefixes (kibi, mebi, gibi) that operating systems display. This is the basis of the MB / MiB and GB / GiB distinction reported by this calculator.
- [3]International Organization for Standardization / International Electrotechnical Commission. ISO/IEC 10918-1:1994, Information technology — Digital compression and coding of continuous-tone still images: Requirements and guidelines — the JPEG standard. Cited for the fact that JPEG is a lossy, quality-parameterised codec whose output size depends on the frequency content of the picture, which is why compression ratio is an input on this page rather than a table of constants.
- [4]International Organization for Standardization (2019). ISO 12232:2019, Photography — Digital still cameras — Determination of exposure index, ISO speed ratings, standard output sensitivity, and recommended exposure index. Cited for the bit-depth framing used here: what a camera's 12- or 14-bit raw capture represents in tonal levels per photosite, as against the 8 bits per channel a JPEG carries.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 590 calculators remain free
- No billing is enabled