CalcEngine

Tailwind Size Converter

Convert Pixels (PX) to Tailwind size utilities (w-*, h-*, size-*) and back.

PX ↔ Tailwind Size
Tailwind's width and height scale uses 0.25rem (4px) increments.
px
16px=4

Forward Formula

Unit = PX ÷ 4

Example: 64 ÷ 4 = 16 (use w-16 / h-16)

Reverse Formula

PX = Unit × 4

Example: 24 × 4 = 96px (use size-24)

Tailwind's w-*, h-* and size-* utilities share the same 4px scale as spacing. Pixel-perfect sizes from your design system map directly to these utilities — divide by 4 and you're done.