px to vh
A converter that calculates the vh from a px for a given breakpoint to make the measurement responsive
Hot Keys
Calculate and copy the result of calculation.
Calculate the result.
Copy the result of calculation.
Reverse the converter to "VH to PX".
Focus the "Pixels" input.
Focus the "Viewport Height" input.
FAQ
How to convert PX to VH?
To convert px to vh, you should know total viewport height for example 1000px Then, just apply formula: px / viewport total height * 100 For example, with a viewport of 1000px, 200px will be converted to: 200 / 1000 * 100 = 20vh
What is the PX to VH formula?
px / viewport total height * 100
What is vh unit? (Viewport Height)
Used in responsive design, Viewport Height (VH) is a unit relative to web page display area called viewport. 1vh corresponds to 1% of display. So, to make an element full height, you should use 100vh. You can also use decimal values. Please note that, depending on browsers, decimal precision can change.
What is px unit? (Pixels)
Pixel unit is the theorical smallest dot displayed on a computer screen. Nowadays, pixel unit can differ between physical resolution and logical resolution. This difference is called device pixel ratio or DPR: Logical resolution = physical resolution / device pixel ratio. So, a screen with 1024x768 physical resolution with a DPR of 2 will have a 512x384 logical resolution.
PX to VH Conversion Table if viewport height size is 1080px
px | vh |
---|---|
10px | 0.926vh |
20px | 1.852vh |
30px | 2.778vh |
40px | 3.704vh |
50px | 4.63vh |
60px | 5.556vh |
70px | 6.481vh |
80px | 7.407vh |
90px | 8.333vh |
100px | 9.259vh |
110px | 10.185vh |
120px | 11.111vh |
130px | 12.037vh |
140px | 12.963vh |
150px | 13.889vh |
160px | 14.815vh |
170px | 15.741vh |
180px | 16.667vh |
190px | 17.593vh |
200px | 18.519vh |
210px | 19.444vh |
220px | 20.37vh |
230px | 21.296vh |
240px | 22.222vh |
250px | 23.148vh |