Image File Size Calculator
Every uncompressed image stores a fixed number of bits for each pixel, so its raw size is just pixels times bits per pixel. This calculator takes the width, height, channel count, and bit depth per channel and returns the uncompressed size in megabytes, the resolution in megapixels, and a compressed estimate based on a compression ratio you supply. Use it to plan storage and card capacity for raw and TIFF workflows, and to understand why a JPEG of the same image is far smaller after compression.
Image file size formula
Bits per pixel = channels * bits per channel
Total bits = width * height * bits per pixel
Megabytes = total bits / 8 / 1024 / 1024
Megapixels = width * height / 1,000,000
Compressed MB = uncompressed MB / compression ratio
The uncompressed figure is the raw data size. Real JPEGs are far smaller; the compressed estimate divides by a ratio you choose for your format and quality.
Image storage context
- Grayscale is 1 channel, RGB is 3, RGBA and CMYK are 4.
- 8-bit is standard, 16-bit suits heavy editing, raw files often use 12 or 14 bits.
- Doubling bit depth roughly doubles the uncompressed size.
- JPEG compression typically shrinks files five to fifteen times.
- Binary megabytes (divide by 1,024) match how operating systems show sizes.
Image file size: frequently asked questions
How is uncompressed image file size calculated?
Multiply the pixel width by the height to get the pixel count, then by the bits per pixel (channels times bits per channel) to get total bits. Divide by 8 for bytes. A 6,000 by 4,000 image with 3 channels at 8 bits each is 6,000 times 4,000 times 24 bits, which is about 68.7 megabytes uncompressed.
What is bit depth and how does it affect size?
Bit depth is the number of bits used to record each colour channel: 8-bit JPEG, 16-bit for high-quality editing, and many raw files use 12 or 14 bits. Doubling the bit depth roughly doubles the uncompressed size, because each pixel stores more colour information.
Why is my actual JPEG much smaller than this?
This is the uncompressed size, the raw data before any compression. JPEG and other formats compress images, often reducing them five to fifteen times. The compressed estimate here divides the uncompressed size by a compression ratio you supply, since the real ratio depends on image content and quality.
How many channels should I enter?
Use 1 for grayscale, 3 for standard RGB colour, and 4 for RGBA (colour plus an alpha transparency channel) or CMYK. The channel count multiplies the per-channel bit depth to give the bits per pixel.
Do megabytes use 1,000 or 1,024?
This calculator reports binary megabytes (MiB), dividing by 1,024 twice, which matches how operating systems usually display file sizes. Storage marketed in decimal megabytes divides by 1,000 instead, giving slightly larger numbers for the same data.
Official sources
- NIST: digital data and units of information.
- W3C / IETF: PNG image format specification (RFC 2083).
Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.