About this tool
Consistent spacing makes layouts feel calm and intentional. Choose a base unit such as 4 or 8 pixels and a scale type, like simple multiples, t-shirt sizes or Fibonacci, or enter your own multipliers. The tokens are listed in px and rem with a visual bar, ready to export.
How to use Spacing Scale Calculator
- Enter the base unit.
- Pick a scale type or custom multipliers.
- Set a token prefix.
- Choose a format and copy the code.
Frequently asked questions
Should I use a 4px or 8px base?
8px is common and keeps choices simple. A 4px base adds finer steps, useful for dense interfaces and small components.
Why export in rem?
rem spacing scales with the user's preferred font size, keeping proportions intact for people who enlarge text.