Viewport Size Calculator
Convert pixel measurements to vw or vh against a 1920×1080 reference size, then copy the result into CSS. Width uses a 1920px base; height uses a 1080px base.
Use this result well
- Inputs that matter
- Pixel Value, Axis
- Output to expect
- Viewport Units Calculator
- Check the units and required inputs before comparing results.
- Keep the assumptions with a copied result so you can reproduce the calculation later.
Projects using Viewport Size Calculator
This tool is part of these guided projects. Each project provides step-by-step instructions with checklists and all the tools you need in one place.
Related Tools
Tools you might need next
Convert between px, pt, em, rem, %, vw. All font size units. For typography. Free design tool with instant browser-based results — no account, works on
Calculate video aspect ratio dimensions from width or height. Convert 16:9, 4:3, 2.35:1 cinema, and vertical 9:16 for social media and broadcast formats.
Calculate DPI from resolution and screen size. Pixels per inch. For display and print. Free design tool with instant browser-based results — no account, works
Reference & details
How it works
Updated September 2026
How it works
Updated September 2026Reference Dimensions
Width conversions use a 1920px reference width. Height conversions use a 1080px reference height; change the base in your own calculation if your design uses a different reference.
vw = px ÷ 1920 × 100; vh = px ÷ 1080 × 100Output Precision
The displayed viewport-unit value is rounded to two decimal places. The result details also show the chosen axis and the reference dimension used.
Displayed result = round(px ÷ reference × 100, 2)Scope
This is a fixed-reference conversion, not a device detector or a fluid sizing range. Check the value at the real target dimensions before applying it to a responsive interface.
Updated: September 2026
Example Scenarios
Convert a 240px component width against the 1920px reference to get a vw value for a design handoff.
Choose the vh axis to express a vertical spacing or height value relative to the 1080px reference.
Use the result as a starting point, then compare it at the minimum and maximum viewport sizes before deciding whether the CSS needs clamp().
FAQ
About Viewport Size Calculator
Enter a pixel value and choose the viewport axis. The calculator converts width values against 1920px and height values against 1080px, with results rounded to two decimal places.