Skip To Content

Home / Web Files / Screen Image Size Calculator

Screen Image Size Calculator

Multiply the displayed size by the screen's pixel density. An image shown 640 pixels wide needs a 1280 pixel file for a 2x screen.

How The Image Shows On The Page
Optional
Used in the tag below. Letters, numbers and dashes.

Export These Sizes

1x Screens
2x Screens
3x Screens

Tag To Copy

How the Math Works

The displayed width and height in CSS pixels are multiplied by 1, 2 and 3 and rounded to whole pixels. The tag below the results uses those widths in the file names so you can match them at export.

How to Use the Tag

Export the three files, upload them and paste the tag into the page. Add a short description of the image inside the alt attribute. Leave it empty only for decoration.

Where the Numbers Come From

Questions People Ask

Do I need a 3x image?

A 3x file serves phones with the densest screens. If file weight matters more, list only 1x and 2x and those phones will use the 2x file.

What goes in the width and height attributes?

Use the 1x size in CSS pixels. The browser reserves that space before the file arrives.

The Short Version

  • A 2x screen packs two device pixels into each CSS pixel in each direction.
  • The srcset attribute lists one file per density and the browser picks one.
  • Keep the width and height attributes at the 1x size so the page holds its shape while loading.