frontendhack-logo
0.8rem = 12.8px

At the default root font size of 16px, 0.8rem is exactly 12.8px.

Calculation based on a root font-size of 16 pixels.

How to convert 0.8rem to px

To convert rem to pixels, multiply the rem value by the root font size: px = rem × 16. For 0.8rem that is 0.8 × 16 = 12.8px.

12.8px is a small size, common for captions, labels, small text and tight spacing.

0.8rem at different root font sizes

Root font sizeInputResult
10px0.8rem8px
12px0.8rem9.6px
14px0.8rem11.2px
15px0.8rem12px
16px0.8rem12.8px
18px0.8rem14.4px
20px0.8rem16px
22px0.8rem17.6px
24px0.8rem19.2px

CSS examples

font-size: 0.8rem; /* 12.8px */
padding: 0.8rem;
margin-bottom: 0.8rem;
width: 0.8rem;

The same values in pixels, if you need a fixed size:

font-size: 12.8px;
padding: 12.8px;

Tailwind CSS equivalent

0.8rem is not part of the default Tailwind scale, but you can use an arbitrary value such as p-[0.8rem] or text-[0.8rem].

Nearby values

REMPixels
0.6rem9.6px
0.625rem10px
0.6875rem11px
0.7rem11.2px
0.75rem12px
0.8rem12.8px
0.8125rem13px
0.875rem14px
0.9rem14.4px
0.9375rem15px
1rem16px

Frequently Asked Questions

0.8rem equals 12.8px when the root font size is the browser default of 16px. The calculation is 0.8 × 16 = 12.8.

12.8px equals 0.8rem at a 16px root font size (12.8 ÷ 16 = 0.8).

Yes. rem is relative to the root font size, so 0.8rem becomes 14.4px at an 18px root and 16px at a 20px root. Use the base font size field above to try any value.

Prefer rem for font sizes, spacing and layout so they respect the user's browser font settings and scale for accessibility. Use px for details that should never scale, such as 1px borders or fixed icon sizes.