Screen Resolution & DPI Checker

The Complete Screen Resolution & DPI Guide

The difference between screen resolution, viewport size, and DPI, how device pixel ratio works, and why DPI is only ever an estimate in a browser.

Open Screen Resolution Checker

Resolution vs Viewport vs DPI

Screen resolution (screen.width / screen.height) is the total physical pixel grid of your display, fixed by the hardware and your current display mode. Available screen space (screen.availWidth / screen.availHeight) is slightly smaller on desktop OSes that reserve space for a taskbar or dock. Viewport size (window.innerWidth / window.innerHeight) is how much of the screen your actual browser window/tab currently occupies - it shrinks and grows as you resize the browser window, completely independent of the screen's fixed resolution.

DPI (dots per inch) describes pixel density - how tightly packed the physical pixels are. Unlike resolution and viewport size, there's no direct browser API that returns a display's true DPI, because that requires knowing the panel's exact physical size in inches, which browsers deliberately don't expose.

Device Pixel Ratio & the 96 DPI Reference

window.devicePixelRatio is the ratio between physical display pixels and CSS pixels. On a standard-density display it's 1 (one physical pixel per CSS pixel); on a high-density "Retina"-style display it's commonly 2 or 3 (a 2x2 or 3x3 block of physical pixels renders each CSS pixel), making text and images look noticeably sharper.

CSS defines its reference resolution as exactly 96 pixels per inch at a device pixel ratio of 1 - this is a specification convention, not a measurement of any real screen. That's why this tool's "approximate DPI" is calculated as 96 × devicePixelRatio: it's the browser's own internal assumption about pixel density, which tends to roughly track real-world density because operating systems adjust the reported device pixel ratio to compensate for their own display scaling settings - but it is still an approximation, not a measured physical value.

Common Use Cases

Responsive Web DevelopmentConfirm exact viewport dimensions and device pixel ratio while testing CSS breakpoints.
Display Scaling TroubleshootingCheck what resolution and DPI your OS is actually reporting after a scaling change.
Orientation TestingRotate your phone or tablet and watch orientation and viewport values update live.

How to Read the Stats

StatSource PropertyMeaning
Screen Resolutionscreen.width/heightTotal physical pixel grid of your display
Available Screen Spacescreen.availWidth/availHeightUsable space after OS taskbars/docks are excluded
Viewport Sizewindow.innerWidth/innerHeightCurrent browser window's content area, updates on resize
Device Pixel Ratiowindow.devicePixelRatioPhysical pixels per CSS pixel
Orientationscreen.orientation.type/angleLandscape/portrait and rotation angle

Frequently Asked Questions

What's the difference between screen resolution and available screen space?

screen.width/height is the full physical panel resolution. screen.availWidth/availHeight subtracts space reserved for OS UI like a taskbar or dock, so it's usually slightly smaller and can shift if you resize or move that taskbar.

Why can devicePixelRatio change without the window being resized?

It changes if you drag a window from one monitor to a different one with a different pixel density, or if the OS display-scaling setting changes. This tool watches for that with a matchMedia resolution query rather than only listening for window resize, so the DPI figure stays live in that case too.

What's the difference between color depth and pixel depth?

screen.colorDepth and screen.pixelDepth are near-identical in modern browsers and normally both report 24 bits (or higher on some wide-gamut/HDR setups). The two separate properties exist for historical specification reasons rather than describing genuinely different things today.

Why does orientation detection fall back to a media query on some browsers?

screen.orientation isn't implemented in every older browser, notably older Safari versions. When it's missing, matching an "(orientation: portrait)" media query gives a decent portrait/landscape approximation, though without the exact rotation angle the real API provides.

Does resizing my browser window change my screen resolution?

No. screen.width/height reflect the display hardware and current OS display mode, completely independent of the browser window. Only window.innerWidth/innerHeight (the viewport) change when you resize the browser.

Open Screen Resolution Checker