Image File Size Calculator
px
px
Color Depth
:1
File Size5.93 MB
Size in KB6,075 KB
Total Pixels2,073,600 px
The Image File Size Calculator estimates how much disk space a raster image occupies. It multiplies the pixel count by the bits per pixel and divides by eight to get the raw, uncompressed byte total, then lets you apply a compression ratio to approximate the size of a saved JPEG or PNG. Results are shown in bytes, kilobytes, and megabytes so you can plan storage and upload limits.
Formula
bytes = (width × height × bitDepth) / 8 / compressionRatio
- width
- Image width in pixels
- height
- Image height in pixels
- bitDepth
- Bits stored per pixel (8, 24, or 32)
- compressionRatio
- How many times smaller the saved file is (1 = uncompressed)
How it works
- Enter the image width and height in pixels and pick a color depth: 8-bit grayscale, 24-bit RGB, or 32-bit RGBA.
- The calculator computes raw size as width × height × bit depth ÷ 8 bytes, which is the uncompressed bitmap footprint.
- Enter a compression ratio above 1 (for example 10 for a typical JPEG) to divide the raw size and estimate the stored file size.
Worked example
A 1920 × 1080 photo at 24-bit color with no compression.
- Total pixels = 1920 × 1080 = 2,073,600.
- Raw bytes = 2,073,600 × 24 ÷ 8 = 6,220,800.
- In megabytes that is 6,220,800 ÷ 1,048,576 ≈ 5.93 MB.
About 5.93 MB uncompressed (6,220,800 bytes).
Frequently asked questions
- Why is my saved JPEG much smaller than this estimate?
- The base figure is the uncompressed bitmap size. JPEG compression typically shrinks photos by 10 to 20 times, so enter a compression ratio in that range to approximate the saved file.
- What bit depth should I choose?
- Use 24-bit for standard full-color RGB images, 32-bit when an alpha transparency channel is present, and 8-bit for grayscale or indexed-color images.
- Does the calculator use binary or decimal megabytes?
- It reports binary megabytes, dividing bytes by 1,048,576 (1024 × 1024). That matches how most operating systems display file sizes on disk.
- Why does file size scale with resolution so quickly?
- Size grows with the total pixel count, which is width times height. Doubling both dimensions quadruples the pixels and therefore roughly quadruples the uncompressed file size.