Screen Resolution vs Viewport Size vs Device Pixel Ratio: What Designers Need to Know
Ask “what resolution is this phone?” and you might get three different answers: the panel’s physical resolution from the spec sheet, the screen size the browser reports to websites, and the size of the browser window itself. All three are correct, and designers need to know which one matters for which decision.
Four numbers, four meanings
| Term | What it is | Example (a typical modern phone) |
|---|---|---|
| Physical resolution | Actual pixels on the panel | 1179 × 2556 |
| Device pixel ratio (DPR) | Physical pixels per CSS pixel | 3 |
| Screen size (CSS pixels) | Physical resolution ÷ DPR | 393 × 852 |
| Viewport | The area the web page renders in | About 393 × 660–750, depending on browser bars |
Websites work in CSS pixels. Media queries, layouts and font sizes all use them. That’s why a phone with nearly 1200 physical pixels across behaves like a 393px-wide screen for your design, and why text and buttons end up a comfortable physical size.
Device pixel ratio
DPR is the bridge between physical and CSS pixels. On a DPR 2 display, each CSS pixel is drawn with a 2 × 2 block of physical pixels; on DPR 3, a 3 × 3 block.
| Device type | Common DPR |
|---|---|
| Standard office monitor | 1 |
| Windows laptop with 125–150% scaling | 1.25–1.5 |
| MacBook, high-end Windows laptop | 2 |
| Most modern phones | 2–3 (some Android phones around 2.6–3.5) |
DPR is also affected by operating system scaling and browser zoom. Zooming a page to 200% on a DPR 1 monitor makes the browser report DPR 2 and halves the viewport width in CSS pixels. That’s how zoom triggers responsive layouts.
You can see all of these values for your current device with the screen resolution checker above.
Why a 4K laptop reports a small screen
A 14-inch laptop with a 2880 × 1800 panel, running at the default 200% scaling, reports a screen of 1440 × 900 CSS pixels. Websites lay out for 1440px, but every element is rendered with four times as many physical pixels, so text and images look very sharp. If the user changes scaling to “more space”, the CSS width grows and everything gets physically smaller.
Screen versus viewport
The screen is the whole display. The viewport is the part of the browser window where the page renders, excluding browser toolbars, tabs, and on desktop, often the scrollbar. On desktop, users resize windows constantly, and many work with the browser at half-screen width. Media queries respond to the viewport, not the screen, which is exactly right: a 1440px screen with a 700px-wide window should get a tablet-like layout.
On mobile, the viewport height also changes as browser toolbars appear and disappear, which affects 100vh. Our viewport units guide covers the dvh and svh fixes.
Choosing breakpoints
Because viewport widths vary continuously, the best breakpoints are where your content starts to look wrong, not specific device widths. That said, it helps to test at widely used viewport widths:
| Viewport width (CSS px) | Typical devices |
|---|---|
| 360–412 | Most Android and iPhone models in portrait |
| 768–834 | Tablets in portrait |
| 1024–1180 | Tablets in landscape, small laptops |
| 1280–1366 | Many laptops |
| 1440–1536 | Larger laptops, scaled high-resolution displays |
| 1920+ | Desktop monitors at 100% scaling |
Common breakpoint choices are around 600, 900 and 1200px, adjusted to your layout. Design mobile first, then add breakpoints when the layout has room to change.
Choosing image sizes
DPR decides how many pixels an image needs:
- Display width × DPR = pixels needed for full sharpness.
- A 400px-wide card image needs 800px for DPR 2 screens and 1200px for DPR 3.
Use srcset and sizes so the browser picks the right file for each device, and export photos at 1x and 2x (3x adds weight with little visible benefit for photos). Use SVG for icons and logos. Our guide to resizing images for the web shows the HTML.
Designing at 1x
Design tools like Figma work in “points” or CSS pixels at 1x. A 390 × 844 frame represents a phone’s CSS screen, not its physical pixels. Export assets at 2x and 3x from those designs. Don’t design at physical resolution (1179 × 2556), or every font size and spacing value will be three times too large when implemented.
Testing and bug reports
Many layout bugs only happen at a specific viewport width, DPR or zoom level. When reporting or investigating a bug, record:
- viewport size in CSS pixels,
- device pixel ratio,
- browser and version,
- zoom level and OS scaling.
The screen resolution checker’s “Copy report” button collects these details for a ticket. Browser DevTools also let you simulate specific viewport sizes and DPR values, which is the quickest way to reproduce a reported issue.