Image File Size Calculator

Image File Size Calculator

Calculate uncompressed and compressed file sizes for digital images based on resolution and color depth. Essential for photographers, web designers, and digital artists.

Last updated: March 2026 | By Patchworkr Team

Calculate Image Size

What is Image File Size?

Image file size is the amount of digital storage space required to save an image. It depends primarily on three factors: the image dimensions (width × height in pixels), the color depth (bits per pixel), and the compression method used.

An uncompressed image stores complete color information for every pixel. For example, a standard RGB image uses 24 bits (3 bytes) per pixel: 8 bits each for red, green, and blue channels. A 1920×1080 pixel image contains 2,073,600 pixels, requiring about 6.2 MB uncompressed.

Compression dramatically reduces file sizes. JPEG uses lossy compression (discarding some data) to achieve 90-95% size reduction, ideal for photographs. PNG uses lossless compression (preserving all data) achieving 50-80% reduction, perfect for graphics with sharp edges and text.

How to Calculate Image File Size

Calculation Formula

Pixels: Width × Height
Bits: Pixels × Bits per Pixel (BPP)
Bytes: Bits ÷ 8
Megabytes: Bytes ÷ 1,048,576

Common Bits Per Pixel (BPP)

1-bit
Monochrome (black/white)
8-bit
Grayscale (256 shades)
24-bit
RGB (16.7M colors)
32-bit
RGBA (RGB + transparency)

Example Calculation

Calculate the file size of a Full HD image (1920×1080) in RGB format:

Given:
Width = 1920 pixels
Height = 1080 pixels
Format = RGB (24-bit)
Step 1:
Calculate total pixels:
Pixels = 1920 × 1080 = 2,073,600 pixels
Step 2:
Calculate total bits:
Bits = 2,073,600 × 24 = 49,766,400 bits
Step 3:
Convert to bytes:
Bytes = 49,766,400 ÷ 8 = 6,220,800 bytes
Step 4:
Convert to megabytes:
MB = 6,220,800 ÷ 1,048,576 = 5.93 MB
Result:
5.93 MB uncompressed
~0.59 MB as JPEG (90% compression)

Frequently Asked Questions

What's the difference between MB and megapixels?

Megapixels (MP) measure the total number of pixels in an image (millions). MB (megabytes) measures the file size. A 10 MP image can range from 1 MB (highly compressed JPEG) to 30 MB (uncompressed RAW) depending on compression.

Why are my actual file sizes different?

This calculator shows theoretical uncompressed sizes and typical compression estimates. Actual sizes vary based on image content complexity, compression quality settings, metadata (EXIF data), and the specific compression algorithm used.

Should I use JPEG or PNG?

Use JPEG for photographs and images with gradients—it offers excellent compression. Use PNG for images with text, sharp edges, transparency, or when you need lossless quality. PNG is larger but preserves every detail.

What is RAW format?

RAW is unprocessed data directly from a camera sensor. It's uncompressed or lightly compressed, preserving maximum image quality and editing flexibility. File sizes are much larger—typically 20-40 MB for modern cameras.

How does color depth affect file size?

Color depth (bits per pixel) directly multiplies file size. Going from 8-bit grayscale to 24-bit RGB triples the file size. 32-bit RGBA adds an alpha channel, increasing size by 33% over RGB.

What's the best resolution for web images?

For web use, aim for 72-150 DPI at display size. A full-width banner might be 1920×600 pixels. For thumbnails, 300×300 is common. Always use JPEG or WebP compression to keep file sizes under 200 KB for fast loading.

Does higher megapixels mean better quality?

Not always. More megapixels help for large prints or cropping, but sensor size, lens quality, and lighting matter more. A 12 MP camera with a great sensor often beats a 48 MP camera with a small, cheap sensor.

Can I reduce file size without losing quality?

For photos, use JPEG quality 85-95% (not 100%)—visually identical but much smaller. For graphics, use PNG with optimization tools. Consider WebP format for 25-35% better compression than JPEG with similar quality.

Related Tools