Color Depth & Storage Calculator

Work out the uncompressed size of an image at any bit depth, the total number of colours that depth can represent, and how the raw figure compares to a typical JPEG or PNG. Useful for capacity planning, teaching the topic, or sanity-checking what HDR really costs in bytes.

Explain like I'm 5 (what even is this calculator?)

Every pixel in an image is a number. Bit depth is how big that number is allowed to get. One bit per pixel: black or white. Twenty-four bits per pixel: any of 16.7 million colours. Tell the calculator the dimensions and the bit depth and it works out the raw storage and the colour count, then shows you how a JPEG or PNG would shrink it down.

Calculate raw size and total colours

Leave at 1 for a still image. Set higher for an animation or multi-page document where every frame is stored uncompressed.

Fill in the form and press the button to see the raw size and colour count.

Save this calculator: press Ctrl + D to bookmark it in your browser.

What bit depth actually buys you

A pixel is just a number. Bit depth is the size of the box that number lives in. One bit per pixel gives you two states, which is enough for a fax or an old Kindle screen. Eight bits per pixel gives you 256 distinct values, which is plenty for grayscale photography or for a small palette. Twenty-four bits per pixel, eight each for red, green and blue, gives you 16,777,216 colours: the universal RGB you see on the web. Above that, the headroom is for professionals who need to push images through heavy edits without banding, or for HDR displays that can actually show more than the standard range.

Why the raw size matters even when nothing ships uncompressed

Three reasons the raw figure is worth knowing. The first is memory. When an image is decoded for display, it sits in RAM at full uncompressed size, regardless of how small the JPEG was on disk. A browser opening a 24 megapixel photo will allocate roughly 100 MB just to hold it. The second is processing. Image pipelines, GPUs and video codecs all work on uncompressed buffers. Knowing the raw size tells you whether a frame fits in cache, in VRAM, or whether you need to tile. The third is upper-bound estimation. The compressed file is always smaller than the raw figure, so the raw number is a useful ceiling for "what is the worst case here".

The 10:1 and 2:1 ratios are rules of thumb, not guarantees

JPEG at quality 80 to 85 lands around 10:1 of raw for a typical photograph. PNG, which is lossless, lands around 2:1 for the same photograph. Both numbers move with content. A photo of an empty sky compresses much harder, sometimes 30:1 for JPEG. A photo of a forest, every pixel different, compresses much less, sometimes 5:1. Use the ratios here as the planning figure for typical photographic input. For graphics with flat colour, screenshots or UI mockups, PNG can comfortably beat 10:1, while JPEG produces ugly artefacts on the same content. The right format always depends on the picture.

HDR, deep colour, and the cost of headroom

30-bit Rec.2020 is the HDR standard for video and high-end displays, ten bits per channel instead of eight. That extra two bits per channel sounds modest but quadruples the per-channel range and removes most of the visible banding in gradients on capable displays. 36-bit and 48-bit, twelve or sixteen bits per channel, are mostly editing and capture formats. RAW files from professional cameras land at 14 or 16 bits per channel because the headroom lets you recover shadows, push exposure and colour-grade without losing detail. The cost is linear in storage: a 48-bit image is twice the raw size of a 24-bit one at the same dimensions.

Animation: linear in frames, until you compress it

The frames input multiplies the single-frame raw size by the frame count. That is the honest worst case for an uncompressed animation, like a sequence of TIFFs in a render farm or a frame buffer holding every frame in memory. Real animated formats do better. APNG and animated WebP delta-encode between frames, dropping the cost of areas that did not change. Video codecs like H.264 and AV1 do far more sophisticated motion compensation, often landing the per-frame cost ten or twenty times below the still-image figure. The calculator is the upper bound, useful for memory planning, not the figure for an MP4 on disk.

Common mistakes

  • Confusing bits per channel with bits per pixel. 8-bit colour usually means 8 bits per channel, which is 24 bits per pixel for RGB. The calculator asks for bits per pixel directly to avoid the ambiguity.
  • Treating JPEG as 24-bit storage. JPEG is 24-bit when decoded into memory, but the file on disk is much smaller because of lossy compression. The raw figure here is decoded size, the JPEG estimate is on-disk size.
  • Forgetting the alpha channel. RGBA is 32 bits, not 24. If your image has transparency, pick the 32-bit option, otherwise you will undercount by a third.
  • Treating animation as free. Uncompressed, every frame costs the same as the first. Compressed, savings depend on how much actually changes between frames.

Related calculators

Bit depth is one axis of file size. These cover the rest.

Frequently asked questions

What does bit depth actually mean?

Bit depth is the number of bits used to describe a single pixel. One bit gives you two states, black or white. Eight bits gives you 256 shades or palette entries. Twenty-four bits gives you the standard 16.7 million colours of an RGB image, eight bits per channel for red, green and blue. Higher bit depths exist for HDR and professional editing, where the headroom matters more than the file size.

Why is the raw size so much bigger than the JPEG on disk?

Raw, uncompressed pixel data is the worst case. JPEG throws away detail your eye barely sees and packs the rest cleverly, landing at roughly 10:1 of raw for a typical photograph at quality 80-85. PNG keeps every pixel exactly but uses lossless deflate compression, which on photos lands around 2:1. Both ratios depend on content: a flat sky compresses much smaller, a forest canopy much larger.

What's the difference between 8-bit grayscale and 8-bit indexed?

They store the same number of bits per pixel, so the file size is the same. The difference is what the byte means. In grayscale, the value is the brightness, 0 black through 255 white. In indexed colour, the value is a lookup into a palette of up to 256 colours that lives in the file header. Same storage, different interpretation.

When would I ever use 30, 36 or 48-bit colour?

30-bit (Rec.2020 HDR) is the colour space used by HDR video and high-end displays, ten bits per channel. 36-bit and 48-bit are professional editing and capture formats: 12 or 16 bits per channel give you headroom for heavy curves and exposure adjustments without banding. The trade-off is that the files double or triple in size. Most consumer workflows do not need them.

Why does animation multiply the size linearly?

An uncompressed animation stores every frame in full, so ten frames is ten times the data of one. Real animated formats like APNG, animated WebP or video codecs like H.264 and AV1 can save a lot through inter-frame compression, only storing the difference between frames. The figure here is the uncompressed worst case, useful for sizing memory and pipeline buffers, not for predicting an MP4.