Skip to content
Other

Image File Size Calculator

Enter your image width, height, and color mode to instantly see the uncompressed file size in bytes, kilobytes, and megabytes. You also get compressed size estimates for JPEG, PNG, WebP, HEIC, AVIF, and TIFF so you can plan storage and bandwidth before you ever export a file.

Your details

Image width in pixels.
px
Image height in pixels.
px
Bits stored per pixel. More bits = larger file but richer color or tone range.
Multiply by more than 1 to estimate total storage for a batch or shoot.
Uncompressed size
23.73 MB

Raw pixel data with no compression applied

Megapixels8.29MP
Bits per pixel24bpp
JPEG (high quality)1.90 MB
JPEG (web quality)1.19 MB
PNG (lossless)13.05 MB
WebP (lossy)1.07 MB
HEIC/HEIF972.0 KB
AVIF850.5 KB
TIFF (LZW)11.87 MB
Total storage (all images)-
Megapixels (MP)8.29
06k12k1251500
Number of images
  • Uncompressed
  • JPEG (web quality)
  • WebP (lossy)

Uncompressed size: 23.73 MB

  • Your 3840 x 2160 image has 8.29 megapixels (8,294,400 total pixels).
  • At 24 bits per pixel, the raw uncompressed data is 23.73 MB. This is the theoretical minimum size before any format container or metadata is added.
  • For web delivery, WebP lossy (~1.07 MB) is typically 10-30% smaller than JPEG (~1.19 MB) at equivalent visual quality.

Next stepFor web images, WebP or AVIF give the best file size with minimal quality loss. For professional editing, keep the uncompressed or TIFF copy.

Formula

Bytes=widthpx×heightpx×bpp8\text{Bytes} = \dfrac{\text{width}_{\text{px}} \times \text{height}_{\text{px}} \times \text{bpp}}{8}

Worked example

A 4K UHD image (3840 x 2160) at standard 24-bit RGB: (3840 x 2160 x 24) / 8 = 24,883,200 bytes = 23.73 MB uncompressed. At a typical JPEG web-quality ratio (~5%), that compresses to about 1.19 MB.

How image file size is calculated

The uncompressed size of a raster image comes down to three numbers: width in pixels, height in pixels, and the color depth (bits per pixel). Multiplying all three gives the total number of bits. Dividing by eight converts bits to bytes, and dividing again by 1,048,576 gives megabytes. For example, a 3840 x 2160 image (4K UHD) at standard 24-bit RGB contains 3,840 x 2,160 x 24 = 198,132,720 bits, which equals about 23.7 MB before any compression is applied. That uncompressed number is the ceiling: every file format you use on top of it can only stay the same size or shrink it.

Bit depth and color modes explained

Bit depth controls how many distinct values can be stored per channel, and therefore how many colors or tones the image can represent. A 1-bit monochrome image stores only black and white. An 8-bit grayscale image stores 256 shades of gray. Standard 24-bit RGB (8 bits per channel times three channels) represents about 16.7 million colors and is the default for web images, consumer cameras, and most screens. Adding an alpha (transparency) channel raises that to 32-bit RGBA. Professional and scientific workflows often use 16 bits per channel (48-bit RGB or 64-bit RGBA) for the headroom they provide during color grading and compositing. Camera RAW files are typically 12-bit or 14-bit per channel before demosaicing; this calculator uses a fully demosaiced equivalent. CMYK images use four channels instead of three, so 8-bit CMYK is 32 bits per pixel.

Compressed format estimates and when to use each format

Compression ratios vary enormously with image content (a blue sky compresses far better than a photo of gravel), so the estimates shown here are typical averages, not guarantees. JPEG at web quality (around 80%) typically reduces a 24-bit image to about 5% of its uncompressed size. PNG is lossless and usually lands around 50-60% for photographic content but can reach 90%+ for simple graphics. WebP lossy at equivalent visual quality beats JPEG by 25-35%. AVIF is newer and typically beats WebP by another 20-30% at the same perceived quality. HEIC (used by iPhone cameras) performs similarly to AVIF. TIFF with LZW compression is lossless and hovers around 50-60% like PNG; it is the preferred archival format for professional imaging.

Storage planning for photographers and videographers

The "number of images" field lets you estimate total storage for a whole shoot or product catalog. A typical full-frame camera shooting 24 MP RAW files at 14-bit captures roughly 25-35 MB per file on disk (camera manufacturers apply their own lossless compression). At 24 MP and 24-bit RGB, the fully uncompressed size is about 69 MB per frame. If you are archiving originals, uncompressed size is the safe planning figure. For video, multiply the still-frame size by the frame rate and duration: a 4K 24-bit frame is 23.7 MB, so 24 fps for one minute produces 34 GB of raw data before codec compression.

Common image sizes and their uncompressed file sizes (24-bit RGB)

NameDimensions (px)MegapixelsUncompressed (24-bit RGB)
HD (1080p)1920 x 10802.1 MP5.9 MB
2K (1440p)2560 x 14403.7 MP10.5 MB
4K UHD3840 x 21608.3 MP23.7 MB
8K UHD7680 x 432033.2 MP94.9 MB
12 MP smartphone4000 x 300012 MP34.3 MB
24 MP DSLR6000 x 400024 MP68.7 MB
50 MP medium format8192 x 614450.3 MP143.8 MB
Instagram post (max)1080 x 13501.5 MP4.1 MB
Twitter/X banner1500 x 5000.75 MP2.1 MB
A4 scan at 300 DPI2480 x 35088.7 MP24.8 MB

Uncompressed sizes assume 8-bit RGB (24 bits per pixel). Actual exported files will be smaller with compression.

Frequently asked questions

What is the formula for image file size?

Uncompressed image file size in bytes = (width in pixels x height in pixels x bits per pixel) divided by 8. For example, a 1920 x 1080 image at 24-bit color is (1920 x 1080 x 24) / 8 = 6,220,800 bytes, or about 5.9 MB. Divide by 1,048,576 to convert bytes to megabytes.

Why is the actual saved file smaller than the uncompressed size?

Image files on disk use compression. Formats like JPEG, WebP, HEIC, and AVIF are lossy, discarding visual detail that the human eye barely notices, which can cut size by 90-95%. Lossless formats like PNG, TIFF LZW, and WebP lossless find and remove redundant data patterns without changing pixel values, typically cutting size by 40-60% for photographic images.

What is 24-bit color and why is it the default?

24-bit color (also called true color or 8-bit per channel RGB) uses 8 bits each for the red, green, and blue channels, giving 256 levels per channel and about 16.7 million possible colors. That is more than enough for most photographic content, which is why it is the default for screens, web images, and most consumer cameras. Higher bit depths like 16-bit per channel (48-bit total) are used in professional editing to prevent banding during heavy grading.

How do I calculate file size for a batch of images?

Set the width, height, and color mode for a single image, then enter the number of images in the "Number of images" field. The calculator multiplies the uncompressed size by that count and shows the total in the "Total storage" output. For real-world planning, divide that figure by the compression ratio of your intended format: for JPEG web exports, divide by about 20; for PNG, divide by about 2.

Does DPI or PPI affect file size?

DPI (dots per inch) and PPI (pixels per inch) describe how tightly pixels are packed when printed or displayed, but they do not change the number of pixels in the file. A 1920 x 1080 image at 72 DPI and the same image at 300 DPI contain identical pixel data and will produce identical file sizes. DPI only matters when calculating the physical print size: divide pixel dimensions by DPI to get the size in inches.

Which format gives the smallest file size for web images?

For photographic content, AVIF currently produces the smallest files at equivalent visual quality, followed closely by HEIC and WebP lossy. JPEG is the most widely supported but produces larger files than any of those modern codecs. For images with transparency, WebP or AVIF replace PNG well at much smaller sizes. For flat graphics and logos with solid colors, PNG or lossless WebP remain excellent because they are lossless.

Why are RAW camera files larger than JPEG from the same camera?

A camera RAW file stores the raw sensor data before in-camera processing: typically 12 or 14 bits per pixel for every sensor site, plus metadata and a thumbnail. A JPEG from the same camera has been demosaiced, color-corrected, sharpened, and then compressed at 8 bits per channel with lossy JPEG compression applied. The JPEG is usually 10-25 times smaller. RAW files are larger because they preserve more information for post-processing.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…