Image file size estimator
Enter the width and height, the number of channels and the bit depth to get the exact uncompressed size. The PNG, JPEG and WebP figures are rough guides for photographic images.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Enter the width and height in pixels.
- Choose the channels (grey, RGB or RGB with alpha) and the bit depth.
- Set the JPEG or WebP quality you plan to export with, then read the sizes.
How it works
Uncompressed bytes = width × height × channels × bit depth ÷ 8, exact apart from the file header. The compressed figures are simple guides: JPEG uses a table of typical bits per pixel for a colour photo by quality setting (about 2.7 bits per pixel at quality 90), WebP is taken as three quarters of that, and PNG as about 60% of the uncompressed size.
Worked example
6000 × 4000 pixels in RGB at 8 bits: 24,000,000 pixels × 3 bytes = 72 MB uncompressed, or 68.7 MiB. At quality 90 the JPEG guide gives about 8 MB; the PNG guide gives about 43 MB.
Tips
- Treat the compressed numbers as a ballpark and save a test file when the exact size matters.
- Screenshots and graphics with flat colours usually compress much smaller than photos, especially as PNG.
Frequently asked questions
How is the uncompressed size calculated?
Width × height × channels × bit depth ÷ 8 gives bytes. A 6000 × 4000 RGB image at 8 bits per channel is 72,000,000 bytes (72 MB). This ignores file headers and metadata.
How accurate are the PNG, JPEG and WebP figures?
They are rough, typical-photo guides and can be off by a factor of two or more. Real sizes depend on how much detail and noise the picture has, on the encoder and on its settings. Flat graphics compress far better than the guide.
What is the difference between MB and MiB?
A megabyte (MB) is 1,000,000 bytes, as disks and many file managers count. A mebibyte (MiB) is 1,048,576 bytes, which some operating systems label MB.
Why do channels and bit depth not change the JPEG and WebP figures?
The guide assumes an ordinary 8-bit colour photo for JPEG and WebP. Channels and bit depth affect the uncompressed and PNG figures only.