Image File Size Calculator

Image File Size Calculator

Leading AI Skill PRO

Enter Calculation

Formula

Size (bytes)=Width×Height×Bit Depth8×(1−Compression %100)\text{Size (bytes)} = \frac{\text{Width} \times \text{Height} \times \text{Bit Depth}}{8} \times \left(1 - \frac{\text{Compression \%}}{100}\right)

Example

Size (bytes)=1920×1080×248×(1−0100)=6,220,800\text{Size (bytes)} = \frac{1920 \times 1080 \times 24}{8} \times \left(1 - \frac{0}{100}\right) = 6{,}220{,}800
Usage stats

Advertisement

Results

Estimated Image File Size
5.933
MB (megabytes)
Total pixels 2,073,600 px
Uncompressed bits 49,766,400 bits
Size in bytes 6,220,800 B
Size in kilobytes 6,075 KB

Report an error on this page

What Is the Image File Size Calculator?

This tool estimates how large an image file will be based on its pixel dimensions, color depth, and how much compression is applied. It's useful for web designers budgeting page weight, photographers planning storage, and developers estimating upload or bandwidth requirements before exporting images.

Diagram of an image grid made of pixels with width, height and per-pixel color depth labels
An image's raw size depends on its pixel dimensions and the bits used per pixel.

How to Use It

Enter the image width and height in pixels, choose the color depth (24-bit true color is the most common for photos), and set an estimated compression percentage. The calculator returns the size in bytes, kilobytes, and megabytes.

The Formula Explained

An uncompressed image stores a fixed number of bits for every pixel. Total pixels equal width × height, and each pixel uses color depth bits, so the raw size in bits is \(W \times H \times D\). Dividing by 8 converts bits to bytes. Compression formats like JPEG remove redundant data, so we multiply by \((1 - \text{compression})\) — a 90% compression keeps just 10% of the uncompressed size.

$$\text{Size (bytes)} = \frac{\text{Width} \times \text{Height} \times \text{Bit Depth}}{8} \times \left(1 - \frac{\text{Compression \%}}{100}\right)$$
Advertisement
Flat bar comparison showing raw uncompressed size shrinking after a compression factor is applied
Compression reduces the raw byte count by the fraction (1 - c).

Worked Example

A 1920 × 1080 photo at 24-bit color: pixels = 2,073,600; uncompressed bits = \(2{,}073{,}600 \times 24 = 49{,}766{,}400\) bits; bytes = \(49{,}766{,}400 \div 8 = 6{,}220{,}800\) bytes ≈ 5.93 MB uncompressed. With 90% JPEG compression, the file shrinks to about 622,080 bytes ≈ 0.59 MB.

File Size Across Common Resolutions and Compression Levels

The table applies the formula \(\text{Size} = \frac{W \times H \times \text{bits}}{8} \times \left(1 - \frac{c}{100}\right)\) at 24-bit color (3 bytes per pixel). Sizes are in MB, dividing bytes by 1,048,576. Real JPEG, PNG or WebP files vary with image content, so treat these as estimates.

Resolution Pixels Uncompressed (MB) 80% compression (MB) 90% compression (MB) 95% compression (MB)
1280×720 921,600 2.64 0.53 0.26 0.13
1920×1080 2,073,600 5.93 1.19 0.59 0.30
3840×2160 8,294,400 23.73 4.75 2.37 1.19
4000×3000 (12 MP) 12,000,000 34.33 6.87 3.43 1.72

Example for 4000×3000 at 90%: \(\frac{4000 \times 3000 \times 24}{8} = 36{,}000{,}000\) bytes, and \(36{,}000{,}000 \times (1 - 0.90) = 3{,}600{,}000\) bytes ≈ 3.43 MB.

Color Depth Reference

Bit depth is the number of bits stored per pixel. Each extra bit doubles the number of values a pixel can represent. The calculator's bit depth selector offers 1, 8, 16, 24 and 32 bits per pixel. For a 48-bit image, which is 16 bits per channel in RGB, you can approximate the size by using 16 bits and tripling the result.

Bit depth (per pixel) Colors / channels Typical use
1-bit 2 values (black or white) Monochrome scans, line art, fax-style documents
8-bit 256 gray levels, or a 256-color indexed palette Grayscale images, indexed GIF/PNG
16-bit 65,536 values (e.g. 16-bit grayscale or 'high color' RGB) Older displays, 16-bit grayscale images
24-bit 8 bits × 3 channels (RGB), about 16.7 million colors (16,777,216) Standard RGB photos such as JPEG
32-bit 24-bit RGB plus an 8-bit alpha (transparency) channel; still about 16.7 million colors, plus 256 opacity levels RGBA PNG, graphics with transparency
48-bit 16 bits × 3 channels (RGB), about 281 trillion combinations High-bit-depth TIFF, RAW-derived editing workflows
Advertisement

Byte Unit Conversions

Unit Binary (1,024-based) Decimal (1,000-based)
1 KB 1,024 bytes (KiB) 1,000 bytes
1 MB 1,048,576 bytes (MiB) 1,000,000 bytes
1 GB 1,073,741,824 bytes (GiB) 1,000,000,000 bytes

8 bits = 1 byte, which is why the formula divides by 8. This calculator divides by 1,024 for KB and 1,048,576 for MB, the binary convention. Operating systems and storage vendors may use the decimal convention, so the same file can show slightly different sizes in different places.

Worked example: a 1920×1080 image at 24-bit with 0% compression gives \(\frac{1920 \times 1080 \times 24}{8} = \) 6,220,800 bytes. Then \(6{,}220{,}800 \div 1024 = 6075\) KB and \(6075 \div 1024 \approx 5.93\) MB.

FAQ

Why is my real JPEG smaller than this estimate? JPEG compression is variable and often exceeds 90%, so use a higher compression percentage to match real exports.

What color depth should I use? 24-bit is standard for full-color photos, 32-bit adds an alpha (transparency) channel, and 8-bit suits grayscale or indexed images.

Does this include file headers? No — the estimate covers pixel data only. Real files add small headers and metadata (usually a few kilobytes).

Last updated:

Most popular in Digital Life

View all Digital Life calculators