Aspect RatioCalculator
Tool

Resolution Finder

Instantly detect your screen resolution, viewport size, device pixel ratio, and more. See how your display compares to global usage stats and copy the JavaScript needed to detect the same values in your own app.

Live Detection

The snapshot below updates from browser APIs in real time. Resize the window, rotate a device, or open the shared link view to compare another setup.

Your Screen

0 × 0

Inferred physical resolution from browser screen size and device pixel ratio.

Ratio

--

DPR

--

Viewport

--

----PPI estimate unavailable

Detection Panel

Your screen resolution

Here is everything the browser can reliably report about your current display. Viewport and orientation values update live as the browser window changes.

Live - resize your window to see viewport values update

Display

Physical Resolution

--

Estimated hardware pixel count of the display panel.

Pixel Density (PPI)

Unknown

Estimated from known devices and common display-size assumptions.

Color Depth

--

Waiting for screen data.

Browser

Viewport Size

--

window.innerWidth × window.innerHeight

Updates as you resize

Available Screen Size

--

screen.availWidth × screen.availHeight

Device Pixel Ratio

--

Waiting for screen data.

CSS Pixel Resolution

--

Logical screen size used by CSS and JavaScript.

Display Capabilities

Refresh Rate

Measuring

Estimated via sixty rAF samples.

HDR Support

--

Waiting for screen data.

Touch Points

--

Waiting for screen data.

Screen Orientation

--

screen.orientation.type

Rotate device to update

Device Detection

Device detection

Based on inferred physical resolution, CSS pixels, device pixel ratio, touch capability, and user-agent hints, the tool attempts to match the current screen against a built-in device database.

Waiting for a device snapshot before matching against the device database.

Global Comparison

How your resolution compares globally

The ranking below uses the built-in 2024 screen-resolution dataset for worldwide web usage. It compares the current CSS screen size against common resolutions seen across desktop and mobile browsing.

Your detected web resolution: --

Outside the current top 15 list

This screen size is not in the built-in global top fifteen. That is common for retina-scaled laptops, unusual monitor classes, and some newer mobile devices.

RankResolutionRatioShareTrend
11,920 x 1,08016:922.8%
21,366 x 76816:910.2%
31,536 x 86416:97.9%
41,440 x 90016:105.8%
51,280 x 72016:95.1%
6390 x 84419.5:94.7%
72,560 x 1,44016:94.3%
81,600 x 90016:93.9%
9375 x 6679:163.2%
101,280 x 80016:102.8%
113,840 x 2,16016:92.6%
121,920 x 1,20016:102.4%
13414 x 89619.5:92.1%
142,560 x 1,60016:101.9%
151,680 x 1,05016:101.7%
16:958.3%
16:1014.8%
19.5:911.2%
4:38.1%
21:93.6%
Other4%

What This Means For Design

Common desktop widths still matter, but mobile-sized screens continue to dominate global traffic. Treat your layout as a range problem rather than a single-canvas problem: phone-first below 430 CSS pixels, laptop-safe between 1280 and 1536, and comfortable desktop layouts around 1920 and beyond.

Breakpoint Analysis

Responsive breakpoint analysis

The current viewport width drives different breakpoint names in different CSS frameworks. Resize the browser window and this section updates in real time.

Current viewport

0px wide

Tailwind CSS

base (>=0px)

Bootstrap 5

xs (>=0px)

Material UI

xs (>=0px)

Chakra UI

base (>=0px)

Tailwind CSS

NameMin WidthCurrent Status
base0pxActive - current
sm640pxNot active
md768pxNot active
lg1024pxNot active
xl1280pxNot active
2xl1536pxNot active

Bootstrap 5

NameMin WidthCurrent Status
xs0pxActive - current
sm576pxNot active
md768pxNot active
lg992pxNot active
xl1200pxNot active
xxl1400pxNot active

Material UI

NameMin WidthCurrent Status
xs0pxActive - current
sm600pxNot active
md900pxNot active
lg1200pxNot active
xl1536pxNot active

Chakra UI

NameMin WidthCurrent Status
base0pxActive - current
sm480pxNot active
md768pxNot active
lg992pxNot active
xl1280pxNot active
2xl1536pxNot active

Breakpoint Ruler

048057660064076890099210241200128014001536

Device History

Your device history

Device snapshots are stored in localStorage inside this browser only. That makes it easy to compare a live machine against previously shared or detected screen reports without creating an account.

CompareDevicePhysicalViewportDPRDate
Select 2-3 devices to compare

All data is stored in this browser only. Nothing from the history table is sent to a server, and the list keeps at most ten records at a time.

Terms Explained

Resolution terms explained

Screen resolution is really a bundle of related concepts. Separating physical pixels, CSS pixels, viewport size, and density makes it easier to debug layouts and choose the right export sizes.

Physical Resolution

Physical resolution is the total number of hardware pixels available on the display panel. On standard-density monitors that usually matches what the browser reports directly. On HiDPI displays this tool infers the hardware pixel count by combining screen size with device pixel ratio.

Use physical resolution when you need to think about export sharpness, monitor capability, capture workflows, or how many true pixels the panel can render.

CSS Pixels

CSS pixels are the logical units used by CSS and JavaScript layout APIs. They are the numbers your media queries, breakpoints, and component widths respond to.

A Retina-class display can have twice or three times as many physical pixels as CSS pixels in each dimension, which is why CSS resolution is often lower than hardware resolution.

Device Pixel Ratio (DPR)

Device Pixel Ratio is the relationship between physical pixels and CSS pixels. A DPR of 2 means one CSS pixel is rendered with a 2 by 2 block of hardware pixels.

DPR matters because raster assets that look sharp on standard displays can look soft on high-density panels unless they are exported at 2x or 3x sizes.

Viewport Size

Viewport size is the visible browser content area in CSS pixels. It changes when you resize the browser, split windows, open developer tools, or rotate a mobile device.

For responsive web development, viewport size is the value that actually decides which media queries are active.

Available Screen Size

Available screen size is the maximum screen area left after the operating system reserves space for taskbars, docks, menu bars, or persistent UI.

It is useful for kiosk apps, desktop tooling, and any layout that wants to know the largest possible window footprint on the current screen.

Pixel Density (PPI)

Pixels per inch measures how tightly packed the hardware pixels are. Higher PPI displays render text and fine interface detail more crisply.

Browsers do not expose diagonal screen size directly, so this tool estimates PPI from known device records or common monitor size assumptions.

Color Depth

Color depth is the number of bits used to represent the color of each pixel. A typical browser reports 24-bit color, which corresponds to 16.7 million colors.

Professional or HDR-capable panels can support 30-bit pipelines, but browsers often still expose 24-bit values for compatibility reasons.

Refresh Rate

Refresh rate is how many times per second the display updates, measured in hertz. Standard office screens run at 60 Hz, while gaming monitors and premium phones often reach 120 Hz or more.

Browsers do not provide a direct refresh-rate API, so this tool estimates it by measuring the cadence of requestAnimationFrame over sixty frames.

Code Snippets

JavaScript code snippets

These snippets mirror the same values used by the tool. Copy them into QA utilities, responsive test pages, browser extensions, or developer docs when you need a quick reference implementation.

Get complete screen information

Read the same core values used by this tool, including inferred physical pixels and CSS pixels.

function getScreenInfo() {
  const dpr = window.devicePixelRatio || 1;
  const cssScreenWidth = Math.round(screen.width);
  const cssScreenHeight = Math.round(screen.height);

  return {
    physicalWidth: Math.round(cssScreenWidth * dpr),
    physicalHeight: Math.round(cssScreenHeight * dpr),
    cssWidth: cssScreenWidth,
    cssHeight: cssScreenHeight,
    availWidth: Math.round(screen.availWidth * dpr),
    availHeight: Math.round(screen.availHeight * dpr),
    viewportWidth: window.innerWidth,
    viewportHeight: window.innerHeight,
    colorDepth: screen.colorDepth,
    pixelDepth: screen.pixelDepth,
    dpr,
    orientation: screen.orientation?.type ||
      (window.innerWidth > window.innerHeight ? "landscape-primary" : "portrait-primary"),
    maxTouchPoints: navigator.maxTouchPoints || 0,
  };
}

console.table(getScreenInfo());

Expected output: Outputs physical pixels, CSS pixels, viewport, DPR, orientation, and touch support in one object.

Calculate aspect ratio

Reduce any width and height pair into a simplified ratio and decimal value.

function getAspectRatio(width, height) {
  function gcd(a, b) {
    return b === 0 ? a : gcd(b, a % b);
  }

  const divisor = gcd(width, height);
  return {
    ratio: `${width / divisor}:${height / divisor}`,
    decimal: Number((width / height).toFixed(4)),
  };
}

console.log(getAspectRatio(1920, 1080));
console.log(getAspectRatio(window.innerWidth, window.innerHeight));

Expected output: Returns values like { ratio: "16:9", decimal: 1.7778 }.

Detect Retina, HDR, and wide color

Classify the panel density and check for HDR or P3 color-gamut support.

function getDisplayType() {
  const dpr = window.devicePixelRatio || 1;

  if (dpr >= 3) return "Super Retina (3x+)";
  if (dpr >= 2) return "Retina / HiDPI (2x)";
  if (dpr >= 1.5) return "High DPI (1.5x)";
  return "Standard (1x)";
}

const supportsHDR = window.matchMedia("(dynamic-range: high)").matches;
const supportsP3 = window.matchMedia("(color-gamut: p3)").matches;

console.log(getDisplayType());
console.log({ supportsHDR, supportsP3 });

Expected output: Returns a density class plus HDR and wide-color support flags.

Listen for live viewport changes

Track viewport width, height, and DPR as the browser window changes.

function onViewportChange(callback) {
  let rafId = 0;

  const handleChange = () => {
    cancelAnimationFrame(rafId);
    rafId = requestAnimationFrame(() => {
      callback({
        width: window.innerWidth,
        height: window.innerHeight,
        dpr: window.devicePixelRatio || 1,
      });
    });
  };

  window.addEventListener("resize", handleChange);
  screen.orientation?.addEventListener?.("change", handleChange);

  return () => {
    window.removeEventListener("resize", handleChange);
    screen.orientation?.removeEventListener?.("change", handleChange);
  };
}

Expected output: Calls your callback with fresh viewport values after resize and orientation changes.

Measure refresh rate

Estimate the panel refresh rate using sixty requestAnimationFrame samples.

function measureRefreshRate() {
  return new Promise((resolve) => {
    const samples = [];
    let last = 0;
    let count = 0;

    function tick(timestamp) {
      if (last) samples.push(timestamp - last);
      last = timestamp;
      count += 1;

      if (count < 60) {
        requestAnimationFrame(tick);
        return;
      }

      const avg = samples.reduce((a, b) => a + b, 0) / samples.length;
      resolve(Math.round(1000 / avg));
    }

    requestAnimationFrame(tick);
  });
}

measureRefreshRate().then((hz) => console.log(`Refresh rate: ${hz}Hz`));

Expected output: Usually resolves to values like 60, 90, 120, or 144 depending on the panel and browser.

Detect active Tailwind breakpoint

Map the current viewport width to a Tailwind-style breakpoint label.

function getTailwindBreakpoint(width = window.innerWidth) {
  if (width >= 1536) return "2xl";
  if (width >= 1280) return "xl";
  if (width >= 1024) return "lg";
  if (width >= 768) return "md";
  if (width >= 640) return "sm";
  return "base";
}

console.log(getTailwindBreakpoint());

Expected output: Returns labels like "base", "sm", "md", "lg", "xl", or "2xl".

Device Database

Common device resolutions database

The built-in database contains 66 common devices and display classes across phones, tablets, laptops, monitors, gaming handhelds, and TV interfaces.

Apple

ModelPhysical ResolutionCSS PixelsDPRPPI
iPhone 15 Pro Max2,796 x 1,290430 x 9323×460
iPhone 15 Pro2,556 x 1,179393 x 8523×460
iPhone 15 Plus2,796 x 1,290430 x 9323×460
iPhone 152,556 x 1,179393 x 8523×460
iPhone 14 Pro Max2,796 x 1,290430 x 9323×460
iPhone 14 Pro2,556 x 1,179393 x 8523×460
iPhone 14 Plus2,778 x 1,284428 x 9263×458
iPhone 142,532 x 1,170390 x 8443×460
iPhone 13 Pro Max2,778 x 1,284428 x 9263×458
iPhone 13 Pro2,532 x 1,170390 x 8443×460
iPhone 132,532 x 1,170390 x 8443×460
iPhone SE (3rd gen)1,334 x 750375 x 6672×326

Samsung

ModelPhysical ResolutionCSS PixelsDPRPPI
Galaxy S24 Ultra3,088 x 1,440412 x 9153.5×505
Galaxy S24+3,120 x 1,440412 x 9153.5×513
Galaxy S242,340 x 1,080360 x 7803×416
Galaxy S23 Ultra3,088 x 1,440412 x 9153.5×500
Galaxy S23+2,340 x 1,080393 x 8732.75×393
Galaxy S232,340 x 1,080360 x 7803×425
Galaxy A542,400 x 1,080412 x 9152.625×401

Google

ModelPhysical ResolutionCSS PixelsDPRPPI
Pixel 8 Pro2,992 x 1,344448 x 9983×489
Pixel 82,400 x 1,080412 x 9152.625×428
Pixel 7 Pro3,120 x 1,440412 x 8923.5×512
Pixel 7a2,400 x 1,080412 x 9152.625×429
Pixel Fold (outer display)2,092 x 1,080379 x 8122.75×408

OnePlus

ModelPhysical ResolutionCSS PixelsDPRPPI
OnePlus 123,168 x 1,440450 x 1,0203.1×510
OnePlus 113,216 x 1,440450 x 1,0003.2×525
OnePlus Open (cover display)2,484 x 1,116431 x 9682.6×431

Resolution And Ratio

Resolution and aspect ratio

Different resolutions can share the same underlying aspect ratio. That is why 1920 x 1080, 2560 x 1440, and 3840 x 2160 all behave like 16:9 canvases even though they have very different pixel counts.

How resolution determines ratio

1920 x 1080 simplifies by a greatest common divisor of 120, which becomes 16:9. The same logic works for 2560 x 1440 and 3840 x 2160, which reduce to the same ratio even though they contain more pixels.

Same ratio, different sharpness

Ratio controls shape. Resolution controls how many pixels are available inside that shape. Two screens can look identical in layout terms while still having radically different clarity and export requirements.

Ratio affects content decisions

For layout and media planning, aspect ratio is often the first decision and resolution is the second. Pick the right shape first, then scale to the pixel density and device class you need.

How-To

How to find your screen resolution

Step 1

Check the auto-detected result

The Resolution Finder detects your screen information as soon as the page loads. The large card at the top shows the current display snapshot without requiring any clicks.

Step 2

Understand which number to use

Use physical resolution for hardware capability and export planning, CSS pixels for design-system and layout work, and viewport size for the exact browser space available right now.

Step 3

Check your device pixel ratio

DPR tells you how many hardware pixels each CSS pixel maps to. High-DPR screens need 2x or 3x image assets to stay sharp.

Step 4

Note refresh rate and color depth

Refresh rate affects perceived motion smoothness, while color depth reflects how many colors the browser reports the display can represent.

Step 5

Compare with global stats

Use the global comparison section to see whether your detected CSS resolution is common, rising, or relatively uncommon among worldwide web users.

Step 6

Save and share your results

Copy the full spec block for bug reports or QA notes, or generate a share link that encodes the detected snapshot so someone else can review the same values.

FAQ

Frequently asked questions

What is my screen resolution?

Your screen resolution is the pixel size of your display, usually written as width by height such as 1920 x 1080. This page reports the inferred physical resolution, the CSS resolution your browser uses, and the live viewport size so you can see each layer clearly.

What is device pixel ratio and why does it matter?

Device pixel ratio describes how many hardware pixels map to one CSS pixel. It matters because high-density displays need larger source images to stay crisp, and it explains why hardware resolution and CSS resolution can be very different on the same device.

Why is my CSS resolution different from my physical resolution?

On HiDPI displays the operating system scales the interface so text and controls stay comfortably sized. That means the browser works in CSS pixels while the hardware uses multiple physical pixels to render each logical pixel.

What is viewport size and how is it different from screen resolution?

Screen resolution describes the whole display, while viewport size describes the visible browser content area. Viewport size changes whenever the browser window changes, so it is the value responsive CSS actually cares about.

How do I check my screen resolution on Windows?

You can check it in Windows display settings, but this tool also reports DPR, viewport size, touch support, orientation, color depth, and a measured refresh-rate estimate in one place.

How do I check my screen resolution on Mac?

macOS System Settings usually shows the scaled resolution rather than the full hardware pixel count. This page helps by showing both the inferred physical pixel dimensions and the CSS dimensions the browser uses.

What screen resolution should I design for?

There is no single perfect target, but common desktop widths like 1920 x 1080, 1366 x 768, and 1536 x 864 still matter, while mobile traffic remains dominant below roughly 430 CSS pixels wide. Design mobile-first, then test across laptop and desktop breakpoints.

Why does my browser report a different resolution than my monitor specification sheet?

Differences usually come from DPR scaling, OS scaling, browser zoom, or the fact that browsers expose logical dimensions rather than raw panel data. This tool separates physical, CSS, and viewport layers so you can see where that difference comes from.

Keep Exploring

Related tools and ratio guides