Image Size Calculator - Dimensions & File Size
Calculate image file size from dimensions and bit depth. Estimate storage requirements for JPEG, PNG, and RAW images based on width, height, and color
Formula
Raw Size = Width × Height × Bits Per Pixel ÷ 8 × Compression Ratio
Calculate raw uncompressed size from pixel dimensions and color depth, then apply format-specific compression ratio. Lossy formats (JPEG, WebP) also factor in quality setting - lower quality = more compression.
Worked Examples
Example 1: 4K Photo for Web
Problem: Calculate file size for a 3840×2160 photo saved as JPEG at 80% quality.
Solution: Dimensions: 3840 × 2160 = 8.29 megapixels\n\nRaw calculation:\n8,294,400 pixels × 24 bits ÷ 8 = 24.88 MB uncompressed\n\nJPEG compression at 80% quality:\nTypical compression ratio: ~10:1 to 15:1\nEstimated size: 24.88 ÷ 12 ≈ 2.07 MB\n\nActual result varies based on image content (detailed photos compress less than simple images).
Result: ~1.5-2.5 MB for 4K JPEG at 80% quality
Example 2: Social Media Image
Problem: Optimize an Instagram post image (1080×1080) across formats.
Solution: Square 1080×1080 = 1.17 megapixels\nRaw: 3.5 MB at 24-bit color\n\nFormat comparison:\nBMP: 3.5 MB (uncompressed)\nPNG: ~1.5-2 MB (lossless)\nJPEG 85%: ~150-300 KB\nWebP 85%: ~100-200 KB\nAVIF 80%: ~80-150 KB\n\nInstagram recommendation: JPEG, 1080px, <1MB
Result: 150-300 KB as JPEG, 100 KB as WebP
Example 3: Print vs Web Resolution
Problem: Same 4000×3000 photo for 8×10 print vs website thumbnail.
Solution: Original: 4000×3000 = 12 megapixels\n\nFor 8×10 print at 300 DPI:\nNeeded: 2400×3000 pixels\nCurrent: 4000×3000 ✓ (plenty of resolution)\nFile size: ~3-5 MB JPEG at high quality\n\nFor 200×150 thumbnail:\nResize to 200×150 = 30,000 pixels\nJPEG size: ~5-15 KB\nWebP size: ~3-10 KB\n\nSame source image, 1000x size difference!
Result: 5 MB for print, 10 KB for thumbnail
Frequently Asked Questions
How is image file size calculated?
Raw (uncompressed) size = Width × Height × Bits per pixel ÷ 8 bytes. A 1920×1080 image at 24-bit color = 1920 × 1080 × 24 ÷ 8 = 6.22 MB raw. Compression dramatically reduces this: JPEG typically achieves 10:1 compression, PNG about 2:1, and WebP 15:1 or better. Actual size depends on image content - detailed photos compress less than simple graphics.
How does JPEG quality setting affect file size?
JPEG quality (1-100) controls compression aggressiveness. Quality 90-100: Minimal compression, largest files, nearly lossless. Quality 80-90: Excellent quality, good compression, recommended for most photos. Quality 60-80: Noticeable artifacts on close inspection, significant size reduction. Below 60: Visible degradation, only for thumbnails. Each 10% quality drop typically reduces size 40-50%.
What is the best image format for web optimization?
For photos: WebP or JPEG (80-85% quality). For graphics/logos: SVG (vector) or PNG-8 (limited colors). For transparency: WebP or PNG-24. For animation: WebP or optimized GIF. Modern best practice: Serve WebP with JPEG/PNG fallback. Use srcset for responsive images. Lazy load below-fold images. Target <200KB for hero images, <50KB for thumbnails.
What are common image aspect ratios?
16:9 (HD video, widescreen), 4:3 (traditional photo/monitor), 3:2 (35mm film, most DSLRs), 1:1 (square, Instagram), 21:9 (ultrawide monitors), 9:16 (vertical video, Stories). Aspect ratio = width ÷ height. Matching content to display aspect ratio avoids cropping or letterboxing.
Is my data stored or sent to a server?
No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.
What inputs do I need to use Image Size Calculator - Dimensions & File Size accurately?
Each field is labelled with the required unit (metric or imperial). Gather your source values before starting — for example, a weight measurement in kilograms, a distance in metres, or a dollar amount — and enter them exactly as measured. The formula section on this page lists every variable and explains what each represents.