| Metric | Value | Copy |
|---|---|---|
| {{ r.key }} | {{ r.value }} |
Screen resolution is the count of pixels across and down a display, and it sets the canvas for everything you see and build. Accurate screen resolution and viewport size measurement helps you plan layouts, pick breakpoints, and compare devices without guesswork. Enter your diagonal only if you want a size estimate, then read the numbers like a checklist you can share.
Viewport size reports the space available to your page after toolbars and chrome, so it reflects the area your content can actually use. The app can also estimate pixel density in plain language when you provide a diagonal, which helps explain why the same layout can look sharper on some screens.
Aspect ratio summarizes shape as a simple pair like 16 to 10, and orientation tells you whether width currently exceeds height. Color depth shows how many bits the screen uses for color, and the device pixel ratio records how many device pixels map to a single CSS pixel.
A quick example helps. A laptop might report 1920 by 1080 for the screen and 1536 by 864 for the viewport on a zoomed display, and a 13.3 inch diagonal would yield a high density estimate that matches a crisp look.
Treat the diagonal as a helper rather than a truth meter, since catalogs and scaling can differ. If a value seems odd, recheck units, try full screen, and rotate the device to see how the numbers change.
The tool observes two pixel domains: the physical screen pixel dimensions and the page’s viewport pixel dimensions. It also reads device pixel ratio, color depth, orientation, and a reduced aspect ratio label. When a diagonal in inches is supplied, it transforms pixel counts into estimated physical width, height, and pixel density.
Pixel density is expressed as pixels per inch and also labeled with the familiar dots per inch term once. Device pixel ratio scales pixel measures from CSS space to the device’s pixel grid, which is required for density estimates to match what your eyes see.
Warnings appear only at extremes to flag likely input or environment issues. Very small diagonals, very large diagonals, and implausibly low or high density are called out so you can recheck units or display scaling.
Comparisons are most meaningful on the same device with the same zoom and scaling settings. Values can differ across platforms because CSS pixels are abstracted from physical pixels to keep content legible.
| Symbol | Meaning | Unit/Datatype | Source |
|---|---|---|---|
w | Screen width in pixels | px | Observed |
h | Screen height in pixels | px | Observed |
vw | Viewport width in pixels | px | Observed |
vh | Viewport height in pixels | px | Observed |
dpr | Device pixel ratio | ratio | Observed |
cd | Color depth per pixel | bits | Observed |
ar | Aspect ratio reduced to X:Y | string | Derived |
| Diagonal length | in | Input | |
| Diagonal pixels | px | Derived | |
ppi | Pixels per inch (density) | px/in | Derived |
| Estimated physical width | in | Derived | |
| Estimated physical height | in | Derived |
Worked example
Given w=1920, h=1080, dpr=2, and =13.3:
Interpretation: density near 300 px/in reflects a high‑clarity display; values change if scaling or diagonal changes.
| Condition | Lower | Upper | Implication |
|---|---|---|---|
| Diagonal seems very small | > 0 in | < 2 in | Recheck units; inches are required. |
| Diagonal seems very large | > 120 in | — | Recheck value; unusually large for a desktop setup. |
| Estimated density unusually low | — | < 50 px/in | Possible TV‑class scale or incorrect diagonal. |
| Estimated density unusually high | > 1000 px/in | — | Likely unit or scaling mismatch. |
Units and rounding: density rounds to one decimal; estimated width and height round to two decimals. Aspect ratio reduces integers using the greatest common divisor. Values are reported using a period as the decimal separator.
| Field | Type | Min | Max | Step/Pattern | Error Text | Placeholder |
|---|---|---|---|---|---|---|
| Diagonal size (in) | Number | 0 | — | 0.1 | Warnings appear for implausible values | None |
| Input | Accepted Families | Output | Encoding/Precision | Rounding |
|---|---|---|---|---|
| Diagonal inches | Numeric | Table of metrics | Text | As above |
| — | — | CSV snapshot | UTF‑8 | As displayed |
| — | — | JSON payload | Pretty printed | As displayed |
Networking and storage: all measurements are computed in the browser. Copy actions write to your clipboard on demand, and downloads are created locally as CSV and JSON files.
Performance and complexity: updates are debounced by roughly 40 ms after layout‑affecting events. Aspect‑ratio reduction uses the Euclidean algorithm and runs in negligible time.
Diagnostics and determinism: with the same inputs and scaling, the same device yields identical results. Changes in zoom, OS scaling, toolbars, or rotation will legitimately change the reported viewport.
Security considerations: no secrets or tokens are required. Only user‑initiated actions access the clipboard or trigger file downloads. Avoid pasting sensitive values into shared documents.
Screen and viewport measurements with an optional diagonal estimate.
Example: Enter 13.3 for a compact laptop; you will see width and height in inches and a density around 300 px per inch when the screen is 1920 by 1080 with a device pixel ratio of 2.
You now have a shareable snapshot for layout and display comparisons.
No. Measurements and estimates are computed in your browser. Clipboard writes and downloads happen only when you click.
It depends on the diagonal you provide and your scaling settings. Correct inches and stable zoom produce consistent, practical estimates.
Inches only. The input rejects negative values and uses a 0.1 increment for convenience.
Once the page is open, measurements continue to work without a connection because they read your device environment directly.
Switch to the JSON tab, then use Copy JSON or Download JSON. The payload includes inputs, metrics, and derived estimates.
It signals an implausible diagonal or density. Recheck units, scaling, and whether an external monitor is active.
Viewport excludes browser chrome and some system UI, so it is usually smaller than the full screen pixel dimensions.
It is the number of bits per pixel your display pipeline reports, commonly 24, and it is not a calibration or gamut measure.