About the Image File Size Calculator
This image file size calculator works out how many megapixels an image has and how much space it takes uncompressed. Enter the width and height in pixels, choose the colour format (RGB, RGBA, CMYK, grayscale or camera raw) and the bit depth per channel, and it returns the size in bytes, decimal megabytes (MB) and binary mebibytes (MiB), together with the aspect ratio and the print size at your chosen pixels per inch.
Photographers use it to estimate raw and TIFF file sizes before buying storage, designers use it to check whether a 16-bit print file will be too large to email, and developers use it to work out the memory an image occupies once decoded. An optional compression ratio gives a rough estimate for compressed formats when you know the typical ratio for your settings.
Uncompressed size is exact for the data itself; real files add a small header and metadata, and embedded previews in raw files add a few megabytes more. Lossless raw compression usually shrinks raw files by 30–50%, and JPEGs vary widely with image detail and quality setting, so treat compressed figures as estimates.
With the default inputs, the file size is 72 MB. Change any value above to recalculate instantly.
How to use the image file size calculator
- 1Enter the image width and height in pixels.
- 2Choose the colour format — RGB for TIFF/PNG, raw for camera raw files.
- 3Pick the bit depth per channel.
- 4Leave compression at 1 for uncompressed size, or enter a typical ratio for compressed files.
- 5Read the megapixels and file size, plus the aspect ratio and print size.
Formula and method
Megapixels are the total pixel count, width times height, divided by one million. Each pixel stores one value per channel — three for RGB, four for RGBA or CMYK, one for grayscale and for camera raw files, where each photosite records only red, green or blue through the Bayer filter. Multiplying pixels by channels by bits per channel gives the total bits; dividing by 8 converts to bytes.
Megabytes here are decimal (1 MB = 1,000,000 bytes), matching how cameras and memory cards are labelled, while MiB (1,048,576 bytes) matches what most operating systems display. The optional compression ratio divides the uncompressed size; use 1 for TIFF, BMP or uncompressed raw.
- W, H
- Image width and height in pixels
- channels
- Samples per pixel (RGB 3, RGBA/CMYK 4, grayscale/raw 1)
- bit depth
- Bits per channel (8, 10, 12, 14 or 16)
- compression
- Compression ratio (1 = none)
Worked examples
24 MP photo as an 8-bit RGB TIFF
6000 × 4000 = 24,000,000 pixels. Three 8-bit channels make 3 bytes per pixel, so the uncompressed image is 72,000,000 bytes — 72 MB, which a computer shows as 68.66 MiB.
45 MP 14-bit raw file
A raw file stores one 14-bit sample per photosite: 45,441,024 pixels × 14 bits ÷ 8 = 79.5 MB uncompressed. With typical lossless compression the file on the card would be noticeably smaller.
4K frame as a 16-bit RGB TIFF
3840 × 2160 = 8,294,400 pixels at 6 bytes each (three 16-bit channels) is 49,766,400 bytes, about 49.8 MB per frame — which is why uncompressed image sequences fill drives quickly.
24 MP JPEG estimate at 10:1
The 72 MB uncompressed 8-bit image divided by a 10:1 compression ratio gives about 7.2 MB, in line with a high-quality JPEG from a 24 MP camera. Detailed scenes compress less and come out larger.
Frequently asked questions
How do I calculate image file size?+
Multiply width × height × number of channels × bits per channel, then divide by 8 to get bytes. A 6000 × 4000 RGB image at 8 bits per channel is 6000 × 4000 × 3 × 8 ÷ 8 = 72,000,000 bytes, or 72 MB uncompressed.
How big is a raw file?+
Uncompressed, a raw file is about megapixels × bit depth ÷ 8 in megabytes: a 24 MP 14-bit raw is about 42 MB, a 45 MP 14-bit raw about 80 MB. Lossless compression typically cuts that by a third to a half, and an embedded JPEG preview adds a little.
What is the difference between MB and MiB?+
A megabyte (MB) is 1,000,000 bytes, while a mebibyte (MiB) is 1,048,576 bytes. Cameras and storage makers use MB; Windows reports sizes in MiB but labels them “MB”, so files appear about 4.6% smaller on a PC.
Does bit depth affect file size?+
Yes, linearly. A 16-bit image is twice the size of the same image at 8 bits per channel. 16-bit files keep far more tonal information for heavy editing, but for final JPEGs and web images 8 bits per channel is standard.
How many megapixels is 4K?+
A UHD 4K frame is 3840 × 2160 pixels, which is 8,294,400 pixels or about 8.3 megapixels. DCI 4K (4096 × 2160) is about 8.8 megapixels — far fewer than a typical stills camera.