All tools

40px to rem

40 pixels expressed in rem, the unit that scales when a user changes their browser's font size.

40px=2.5rem

40 ÷ 16 = 2.5 — rem is just pixels divided by the root font size, which defaults to 16px.

root size40px in rem
14px2.8571rem
16px2.5rem
18px2.2222rem
20px2rem

Different value? Use the converter.