Tested tool guide
Tested browser tools
Checked August 16, 2026
What Viewport Width Calculator does, with a checked example
Type a viewport width and height - the design width of a phone or the window you are targeting - and this page converts between pixels and the four viewport units: vw, vh, vmin, and vmax. It works in both directions: 720px at a 1440px-wide window is 50vw, and 6.4vw at 375px wide is 24px. The thing users get wrong: these units measure the window or iframe, not the screen, and on mobile the address bar changes the height, so a vh value computed here may not match what actually renders.
Worked example
A concrete input and expected output from the current implementation.
Input
Viewport 375 x 812, target 24 px
->
Expected output
24 px = 6.4vw (and 6.4vmin, since 375 is the smaller dimension)
24 is 6.4 percent of 375, and vmin resolves against the smaller of the two dimensions, which is also 375, so both conversions land on the same value.