📋 How we test
ⓘ How accurate is this? — click to expand

The devicePixelRatio API is subject to browser zoom adjustments. OS scaling settings and custom browser zoom levels directly alter this logical ratio. This tool cannot measure hardware pixel density (PPI) without knowing the physical screen diagonal size.

Device pixel ratio (DPR) checker

Device Pixel Ratio
Detecting...
window.devicePixelRatio
Physical Resolution
Detecting...
screen.width × screen.height
CSS Viewport
Detecting...
innerWidth × innerHeight
Effective Resolution
Detecting...
DPR × CSS viewport
Pixel Density Tier
Detecting...
Standard / Retina / Ultra Retina
Detecting device pixel ratio status...

Your DPR Visualized

The grid below shows how your browser renders a single CSS pixel. Each square represents one physical pixel. A higher DPR means more physical pixels are used to render the same logical area, resulting in sharper text and smoother curves.

Detecting layout scaling...
🖥️ Screen Resolution Checker

A Device Pixel Ratio (DPR) is the ratio between a display's physical resolution and its logical CSS layout resolution. It determines how many hardware pixels render a single CSS pixel. High-DPR screens, such as Apple's Retina displays, use 4 to 9 hardware pixels per CSS pixel to make text and images look sharper.

Instantly detect your display's device pixel ratio, physical vs CSS pixel mapping, and pixel density tier. To see the full picture alongside your hardware resolution, use our screen resolution checker. You can also analyze other options using our display tools.

💡 Key Takeaway: Your device pixel ratio determines how sharp text and images appear on your screen. Higher DPR means more physical pixels per CSS pixel, producing crisper rendering; essential knowledge for web designers and front-end developers.

🔬 Testing methodology and accuracy guidelines

Methodology: This tool reads the display configuration by querying standard layout APIs in your browser engine. It reports the multiplier used to scale logical layout units onto the screen's hardware grids. However, this query cannot verify the physical monitor subpixel layout or prove panel manufacturing specs.

Limitations: Browser diagnostics rely on the standard MDN devicePixelRatio API which is subject to browser zoom adjustments. Operating system scaling settings and custom browser zoom levels directly alter this logical ratio. This test cannot measure hardware pixel density (PPI) without knowing the physical screen diagonal size.

Privacy: Screen diagnostics run in your browser. ScreenRes.app does not need to store your display measurements for the tool to work. Some third-party services, such as advertising or consent tools, may use cookies or similar technologies. For details, view our tool accuracy and privacy statement.

Our diagnostics follow our testing methodology and editorial policy. Under these standards, tools are verified for technical accuracy periodically.

What device pixel ratio means

Device Pixel Ratio (DPR), also called CSS pixel ratio, is the ratio between the number of physical hardware pixels on your display and the number of logical CSS pixels. A ratio of 1 means one logical pixel maps directly to one physical pixel. High-resolution screens use multiple physical pixels to render each logical pixel to increase visual clarity.

CSS pixels vs physical pixels

CSS pixels are the units used in stylesheets and layout design to define size and layout constraints. Physical pixels are the tiny individual hardware dots that emit light on your screen. The browser maps CSS layout commands onto physical pixels using the device pixel ratio as a multiplier.

This abstraction ensures web elements look consistent across different displays. Read our explanation of viewports vs resolutions vs DPR to see how these values scale. The resulting browser viewport size — measured in logical CSS pixels — is always smaller than the hardware resolution on high-DPR devices. A high-density screen renders text using more hardware dots to make lines appear sharp rather than blurry.

Why DPR changes with zoom or scaling

Browser zoom alters the number of physical pixels used to render a single CSS pixel. When you zoom in, the browser increases the size of layout elements, which raises the reported device pixel ratio. This change allows content to scale up while maintaining font clarity.

Operating system scaling settings also affect this value. Setting your display scaling to 150% in your system display menu changes the baseline DPR multiplier to 1.5. The browser reads this scaling configuration automatically to adjust page layouts.

How to interpret the DPR result

A DPR value of 1 indicates a standard-density display with a one-to-one pixel mapping. Values of 2 or 3 represent high-density screens, such as Retina displays, where text and images are extra sharp. Decimal values like 1.25 or 1.5 show that fractional system scaling is active on your device.

You can calculate your effective screen resolution by dividing your physical screen resolution by the device pixel ratio. High-DPR screens have a smaller logical viewport size than their actual hardware specifications.

Why developers and designers use DPR

Knowing the device pixel ratio is essential to serving high-quality image assets. Designers provide double-resolution images to prevent blurriness on Retina displays. Modern websites use responsive image markup to load the correct file size depending on the user's screen.

Developers also use this metric to scale HTML5 canvas elements properly. Resizing canvas buffers to match physical pixels avoids pixelation during custom rendering.

You can also target specific density tiers using media queries to load optimized layouts. Read our guide to responsive CSS breakpoints to understand typical design widths.

Canvas pixel-density compensation (JavaScript snippet)

To prevent pixelation on HTML5 canvas elements on high-DPR screens, resize the canvas buffer on the fly while keeping its CSS display size fixed. Use the following code template:

function setupDprCanvas(canvas, width, height) {
  const dpr = window.devicePixelRatio || 1;
  // Scale drawing buffer to match physical pixels
  canvas.width = width * dpr;
  canvas.height = height * dpr;
  // Force layout style to match logical CSS pixels
  canvas.style.width = width + 'px';
  canvas.style.height = height + 'px';
  const ctx = canvas.getContext('2d');
  // Scale context drawing actions to hide resolution difference
  ctx.scale(dpr, dpr);
  return ctx;
}

Testing high-DPR layouts on the fly

To verify how your site scales on 2x or 3x screens without buying expensive test devices, use browser emulation:

  1. Open Chrome DevTools (F12 or Ctrl+Shift+I).
  2. Click the Toggle Device Toolbar icon (or press Ctrl+Shift+M).
  3. Click the three dots options menu in the device emulation toolbar and select Add device pixel ratio.
  4. Use the dropdown options (e.g. 1.5, 2.0, 3.0) to emulate different pixel density behaviors in real time.

Common device DPR values

The table below shows the typical device pixel ratios for popular devices and display types. These values can vary between models and OS scaling settings.

Device / Display Type Typical DPR Pixels per CSS pixel Classification
Standard desktop monitor (1080p, 1440p)11 physical pixelStandard
Apple Retina MacBook (13–16 inch)24 physical pixels (2×2)Retina
iPad / iPad Pro (2018+)24 physical pixels (2×2)Retina
iPhone 6/7/8 Plus39 physical pixels (3×3)Ultra Retina
iPhone X–16 Pro Max39 physical pixels (3×3)Ultra Retina
4K monitor at 200% scaling24 physical pixels (2×2)Retina
4K monitor at 150% scaling1.52.25 physical pixelsHiDPI
Android flagship phones2.5–3.56.25–12.25 physical pixelsUltra Retina
27–32 inch 5K display24 physical pixels (2×2)Retina

Related tools and guides

If you want to check other screen parameters, browse our collection of display tools. To go deeper on physical pixel density and understand the difference between software scaling and hardware sharpness, you can calculate your pixel density using the PPI calculator. You can also read our guide explaining DPI vs PPI differences.

Frequently asked questions

Does browser zoom affect the device pixel ratio?
Yes, zooming in or out changes the logical size of CSS pixels on your screen. The browser adjusts the reported ratio as you zoom to reflect how many physical pixels render each CSS unit.
What is a Retina display pixel ratio?
Apple Retina displays typically have a device pixel ratio of 2 or 3. This means they use 4 or 9 physical pixels to draw a single logical CSS layout pixel, making text look smooth and sharp.
Why do high-DPR screens sometimes load blurry images?
Standard-resolution images only contain enough pixel data for a one-to-one mapping. On a high-DPR screen, the browser must stretch these images to cover the physical pixels, which causes a blurry appearance. Serving double-resolution assets resolves this issue.
Sources & References: MDN: devicePixelRatio · W3C: CSSOM View Module · MDN: Viewport Meta Tag · Wikipedia: Retina Display