frontendhack-logo
13px = 0.8125rem

At the default root font size of 16px, 13px is exactly 0.8125rem.

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

How to convert 13px to rem

To convert pixels to rem, divide the pixel value by the root font size: rem = px ÷ 16. For 13px that is 13 ÷ 16 = 0.8125rem.

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

13px at different root font sizes

Root font sizeInputResult
10px13px1.3rem
12px13px1.0833rem
14px13px0.9286rem
15px13px0.8667rem
16px13px0.8125rem
18px13px0.7222rem
20px13px0.65rem
22px13px0.5909rem
24px13px0.5417rem

CSS examples

font-size: 0.8125rem; /* 13px */
padding: 0.8125rem;
margin-bottom: 0.8125rem;
width: 0.8125rem;

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

font-size: 13px;
padding: 13px;

Tailwind CSS equivalent

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

Nearby values

PixelsREM
13px0.8125rem
2px0.125rem
3px0.1875rem
4px0.25rem
5px0.3125rem
6px0.375rem

Frequently Asked Questions

13px equals 0.8125rem when the root font size is the browser default of 16px. The calculation is 13 ÷ 16 = 0.8125.

0.8125rem equals 13px at a 16px root font size (0.8125 × 16 = 13).

Yes. If the root font size is 18px, 13px equals 0.7222rem, and at 20px it equals 0.65rem. The pixel value itself never changes, only the rem equivalent. 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.