Image File Size Estimator (KB/MB from Dimensions and Format)
There are good reasons to know how big an image will be before you encode it: the Core Web Vitals LCP budget on a landing page sets a ceiling on the hero image, CDN bandwidth costs scale with bytes served, and an image content management system needs to validate uploads against per-asset caps. This tool gives a fast estimate from three inputs that are usually known up front (pixel dimensions, target format, target quality), based on bits-per-pixel rates we measured on 38 photographs at every setting the tool offers. It is meant for planning, not for replacing the actual encoder when bytes need to be exact.
Bits Per Pixel by Format
We encoded 38 photographs (landscapes, people and architecture from Wikimedia Commons, each resized to 1920 px wide) at every setting the tool offers and measured the bits per pixel. Medians: JPEG 1.13 at quality 75, 1.57 at 85 and 1.99 at 90; WebP 0.84 at quality 75 and 1.81 at 90; AVIF 0.86 at quality 60; PNG-24 11.95 (lossless). Same-number quality settings are not equivalent across formats, which is why AVIF at 60 comes out about the same size as WebP at 75. The tool multiplies the median by width times height for the estimate, and uses the 10th and 90th percentile for the typical range.
Why It Is an Estimate, Not an Exact Number
The real encoder output depends on the actual content. A photo of a busy outdoor scene with lots of detail will encode larger than a photo of a uniform blue sky at the same dimensions and quality setting. A graphic with hard edges and flat colors will encode smaller as PNG than as JPEG. The spread is wide even among ordinary photos: at JPEG quality 85 the middle 80 percent of our test set ran from 0.92 to 2.06 bits per pixel, a factor of more than two. That is why the tool shows a range next to the median rather than a single confident number. Busy, detailed scenes land near the top of the range and smooth skies or studio backgrounds near the bottom; flat graphics, text and line art can fall outside it entirely. Use the tool for budgeting and the real encoder for the final bytes.
Planning an LCP Budget
The most common reason to estimate image size up front is to fit within the Core Web Vitals LCP (Largest Contentful Paint) budget on a landing page. A hero image at 1920x1080 in JPEG quality 85 comes to 1920 × 1080 × 1.57 / 8 = about 397KB at the median (233 to 521KB across the typical range), which is heavy for a fast LCP on a mid-range mobile connection. Switching the same image to WebP at quality 75 drops the median estimate to about 213KB. AVIF at quality 60 lands at about 218KB, so to get a real saving from AVIF you need a lower quality number (AVIF at 50 is about 139KB). The tool lets you compare all four format-quality combinations side by side, which is the right framing for the LCP-budget decision.
CDN Bandwidth and Image Cap Planning
For CDN cost projection at a given monthly impression count, the per-image average size times the impression count times the cost-per-gigabyte gives a rough bandwidth bill. The tool helps in the format-selection step: a switch from JPEG quality 85 to WebP quality 75 across all images on a high-traffic site can cut the image bandwidth roughly in half, which is the kind of savings that pays for the engineering effort to add format negotiation to the asset pipeline. The same calculation works in the other direction for per-upload validation: if your application caps images at 1MB, the tool tells you which combinations of dimensions and quality stay under that cap and which require dimensional or quality compromises.
This tool plans the encode; Advanced Image Optimizer performs it, Image Converter handles the format switch alongside, and SVG Optimizer picks up the vector case where bits-per-pixel does not apply. Use the estimator to set the target, then use the optimizer to hit it.
Frequently Asked Questions
Built by Derek Giordano · Part of Ultimate Design Tools