Skip to content
Omnikalc

Color depth calculator: how many colors and how big is the image?

Choose the bits per channel and the number of channels, then enter the image size to get the bits per pixel, the number of colors and the uncompressed file size.

Updated on
Your inputs
px

Value out of range

px

Value out of range

Results

Number of colours (or gray shades)

16,777,216

Bits per pixel
24
Levels per channel
256
Step between two levels
0.392%
Uncompressed image size
6.22 MB

Color depth tells you how finely a pixel can describe a color, and it sets both the number of colors and the memory an image uses. The color depth calculator takes the bits per channel, the number of channels and the image size and gives the bits per pixel, the levels per channel, the number of colors, the step between two levels and the uncompressed size.

How the calculation works

  • Bits per pixel = bits per channel × number of channels. A common RGB image uses 3 channels of 8 bits, so 24 bits per pixel; an alpha channel for transparency adds a fourth.
  • Levels per channel = 2^(bits per channel). With 8 bits there are 256 levels, from 0 to 255.
  • Number of colours = 2^(bits per channel × 3) for a colour image. The alpha channel carries transparency and does not add colours. A grayscale image has 2^(bits) shades.
  • Uncompressed size = width × height × bits per pixel ÷ 8 bytes, shown here in megabytes (1 MB = 1,000,000 bytes).

Example

An 8-bit RGB image has 3 × 8 = 24 bits per pixel, 256 levels per channel and 256³ = 16,777,216 colours. Each step between two levels is 100 ÷ 255 = 0.392%. At 1,920 × 1,080 pixels the uncompressed image takes 1,920 × 1,080 × 24 ÷ 8 = 6,220,800 bytes, or 6.22 MB. Formats such as JPEG or PNG store the same image in much less space.

Why it matters

Color depth matters for photography, screen design, game graphics and video. It decides how smooth gradients look, whether a file can hold an HDR image and how much memory a screenshot or a texture uses, so it helps in choosing a file format and a capture setting.

Good to know

The count of colors is the number of codes the format can hold and not the number a screen can show, since many displays are 8-bit or use dithering. Indexed formats such as GIF use a palette and have a different structure. Compressed sizes depend on the content, so treat the raw size as an upper bound.

The photo storage calculator estimates the disk space of a whole library and the pixel density calculator relates the pixel count of a screen to its physical size.

Frequently asked questions

What is the difference between 8-bit and 10-bit color?

An 8-bit channel has 256 levels and a 10-bit channel has 1,024, so a 10-bit RGB image can show over a billion colors against 16.7 million. The extra levels make gradients smoother and reduce banding in skies and shadows, which is why HDR video uses 10 bits.

What is the alpha channel?

Alpha stores how transparent each pixel is, from fully clear to fully solid. It is an extra channel, so an RGBA image takes 32 bits per pixel at 8 bits per channel. It does not add colors, which is why the calculator counts colors from the three color channels only.

Why is the real file smaller than the result?

The result is the raw size, with every pixel stored in full. JPEG, PNG, WebP and video codecs compress the data by removing redundancy, often by a factor of 10 or more. The raw size is still useful because it is the memory the image takes once it is opened.

What is color banding?

Banding appears as visible steps in a smooth gradient, when the gap between two levels is large enough for the eye to notice. A higher bit depth shrinks the step. The calculator shows the step as a share of the full range, for example 0.39% at 8 bits.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.