Responsive Image Size Calculator
Responsive Image Size Calculator
Enter the maximum width your image will be displayed at in CSS pixels (its layout size, not its file size). This calculates the actual pixel widths you need to export for each common screen pixel density, so your image stays sharp on retina and other high-DPI displays.
A high-DPI ("retina") screen packs more physical pixels into the same physical space than a standard display, so an image sized for exactly its CSS display width looks visibly blurry when viewed on one — the browser has to stretch a lower-resolution source image to fill more actual pixels than it contains. Exporting versions at 1x, 1.5x, 2x, and 3x the display width and serving them through the HTML srcset attribute lets the browser automatically pick the sharpest version that matches each visitor's actual screen density, without wasting bandwidth on an oversized image for visitors on standard-density screens.
- Formula: Source Width = Display Width × Device Pixel Ratio, calculated for the four most common ratios: 1x, 1.5x, 2x, and 3x.
- Why multiple sizes matter: a high-DPI ("retina") screen packs more physical pixels into the same space, so a 1x image looks blurry — browsers use the `srcset` attribute to pick the best-fitting source automatically.
- 1x, 2x, and 3x are the most important: most devices fall into these three density buckets; 1.5x is a smaller but still meaningful bucket for some Android devices.
Do I need all four sizes for every image?
Not necessarily — 1x, 2x, and 3x cover the vast majority of devices; adding 1.5x is a smaller optimization that some sites skip to reduce build complexity.
How do I use these widths in HTML?
List them in an img tag's srcset attribute alongside a sizes attribute describing your layout, and the browser automatically downloads the best-fitting one.
Responsive Image Size Calculator


Enter the maximum width your image will be displayed at in CSS pixels (its layout size, not its file size). This calculates the actual pixel widths you need to export for each common screen pixel density, so your image stays sharp on retina and other high-DPI displays.
A high-DPI ("retina") screen packs more physical pixels into the same physical space than a standard display, so an image sized for exactly its CSS display width looks visibly blurry when viewed on one — the browser has to stretch a lower-resolution source image to fill more actual pixels than it contains. Exporting versions at 1x, 1.5x, 2x, and 3x the display width and serving them through the HTML srcset attribute lets the browser automatically pick the sharpest version that matches each visitor's actual screen density, without wasting bandwidth on an oversized image for visitors on standard-density screens.

- Formula: Source Width = Display Width × Device Pixel Ratio, calculated for the four most common ratios: 1x, 1.5x, 2x, and 3x.
- Why multiple sizes matter: a high-DPI ("retina") screen packs more physical pixels into the same space, so a 1x image looks blurry — browsers use the `srcset` attribute to pick the best-fitting source automatically.
- 1x, 2x, and 3x are the most important: most devices fall into these three density buckets; 1.5x is a smaller but still meaningful bucket for some Android devices.
Do I need all four sizes for every image?
Not necessarily — 1x, 2x, and 3x cover the vast majority of devices; adding 1.5x is a smaller optimization that some sites skip to reduce build complexity.
How do I use these widths in HTML?
List them in an img tag's srcset attribute alongside a sizes attribute describing your layout, and the browser automatically downloads the best-fitting one.
