Every Drawer
All tools

Spacing Calculator

Build a scale of spacing steps from one base size, as CSS variables in rem or pixels.

How it works

Build a scale of spacing steps from one base size, as CSS variables in rem or pixels.

  1. Set your Smallest step, in pixels.
  2. Choose how Steps grow: even, doubling or golden.
  3. Press Copy to take the CSS variables.

Good to know

What’s a spacing scale?

A short list of sizes for margins and gaps, all built from one base so layouts stay consistent. Each step shows in pixels and rem.

Can I get the spacing in pixels instead of rem?

Yes. Change Use from rem to px and the CSS variables come out in pixels.

More like this