How to convert CSS pixels to CSS inches
in = px ÷ 96
Divide the px reading by 96.
Worked examples
16 px ≈ 0.1666666667 in
16 ÷ 96 ≈ 0.1666666667
Font basis for this example: element 16 px; root 16 px.
24 px ≈ 0.25 in
24 ÷ 96 ≈ 0.25
Font basis for this example: element 16 px; root 16 px.
Frequently asked questions
Which font or display assumption applies?
em and rem depend on the specified font context. CSS absolute units have fixed relationships to reference pixels, which do not necessarily equal physical display pixels.