Image File Size Calculator

Calculate an image file size from width, height, and bit depth.
Shows the uncompressed size plus PNG and JPEG estimates, megapixels, and bits per pixel.

Estimated File Size

The size of an uncompressed image comes from a simple count: how many pixels it has, times how many bits each pixel uses, divided by eight to turn bits into bytes. A pixel in a standard photo is stored as 24 bits, 8 bits each for the red, green, and blue (RGB) channels, which is why 24-bit color is often called truecolor. Add an alpha channel for transparency and you reach 32 bits per pixel.

So a 4,000 by 3,000 photo, which is 12 megapixels, at 24 bits works out to 4000 times 3000 times 24 divided by 8, about 36 megabytes fully uncompressed. That is what a raw bitmap or a BMP file would take. You almost never store images that way, which is where compression comes in.

This calculator shows the uncompressed size first, then estimates what common formats produce. PNG is lossless and typically squeezes photos to roughly a third of the raw size, more for flat graphics with large solid areas. JPEG is lossy and far smaller, often a tenth or less, by discarding fine detail the eye barely registers. The ratios used here are reasonable averages, not promises. A busy photo full of leaves and texture compresses worse than a clear blue sky, because JPEG works by removing repetition and a noisy image has little repetition to remove.

Reach for the uncompressed figure when you need a guaranteed ceiling, such as sizing a memory buffer or a frame in video. Reach for the JPEG estimate when you are planning storage budgets or upload bandwidth, where the real number is what users feel.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.