Convert % to px
At the browser default root font size of 16 px, 1% = 0.16px. Change the base below if your project uses a different root size.
Formula
px = % × 0.16
% = px × 6.25
Because % is relative, this ratio holds only at a 16 px base. If your project sets html { font-size: 62.5% } — a common trick that makes 1rem equal 10 px — set the base above to 10 instead.
Percent to PX conversion table
| % | px |
|---|---|
| 8% | 1.28px |
| 10% | 1.6px |
| 12% | 1.92px |
| 14% | 2.24px |
| 16% | 2.56px |
| 18% | 2.88px |
| 20% | 3.2px |
| 24% | 3.84px |
| 28% | 4.48px |
| 32% | 5.12px |
| 36% | 5.76px |
| 40% | 6.4px |
| 48% | 7.68px |
| 56% | 8.96px |
| 64% | 10.24px |
| 72% | 11.52px |
| 80% | 12.8px |
| 96% | 15.36px |
| 128% | 20.48px |
About %
For font size, a percentage is relative to the parent element’s font size, so 100% equals 16 px at the default. Like em, percentages compound through nesting.
About px
The CSS pixel is the reference unit of the web. It is not a physical device pixel — it is an angular measure standardised at 1/96th of an inch, which the browser scales for device pixel ratio and zoom.
Which unit should you use?
| Property | Recommended unit | Why |
|---|---|---|
| Font size | rem | Scales with the user's browser font-size preference, which px ignores — an accessibility requirement. |
| Padding and margin | rem or em | rem for a consistent global rhythm; em when the spacing should track the component's own text size. |
| Borders and hairlines | px | You almost always want exactly one crisp pixel, not a value that scales. |
| Media query breakpoints | em | Historically the most reliable across browsers when the user zooms. |
| Print stylesheets | pt, cm, mm | These map to real physical measurements on paper. |
Frequently asked questions
What is 16% in px?
16% equals 2.56px at a 16 px root font size.
How do I convert % to px?
Multiply the % value by 0.16. Going the other way, multiply the px value by 6.25.
Does the root font size change the result?
Yes. One of these units is relative to the root font size, so changing it changes the conversion. Use the base control above to match your project.
Why does CSS use 96 pixels per inch?
It is a historical convention from early desktop displays that became the fixed CSS reference. It has nothing to do with your monitor's real pixel density — the browser scales CSS pixels to physical ones for you.