Turning scattered padding values into a spacing scale
An app that grew without a plan often has spacing values everywhere: 5px, 6px, 10px, 14px, 15px, 18px, 30px, 32px and more. Each was right where it was typed, but together they make the layout look slightly uneven. A spacing scale replaces them with a short list everyone shares. The useful first question is not "which values" but "what range": here the smallest gap is about 4px, between an icon and its label, and the largest is about 64px, between page sections.
Type 4 and 64, choose 7 steps growing faster as they get bigger, and snap to a 4px grid. The factor between steps is the sixth root of 16, about 1.59. The raw values are 4, 6.35, 10.08, 16, 25.4, 40.3 and 64, and on the 4px grid they become 4, 8, 12, 16, 24, 40 and 64. That is close to the scales many design systems arrived at by hand, which is a good sign the method fits how spacing is used.
Now map the old values onto the scale. 5px and 6px become 4px or 8px, depending on how tight the element should feel. 10px becomes 8 or 12, 14px and 15px become 16, 18px becomes 16 or 24, and 30px and 32px both become 24 or 40. Some layouts change slightly, and that is the point: two cards with 15px and 16px padding never looked deliberately different. With the CSS variables in place, the code reads padding: var(--space-4) rather than a number someone has to guess the reason for.
Even steps suit a smaller job. For button padding from 8px to 24px in 5 steps on a 4px grid, the scale is 8, 12, 16, 20 and 24. A growing scale over that range would bunch the small steps together and leave little difference between them. Try both in the preview: the bars make it easy to see whether the steps feel evenly spaced to the eye, which is what matters.
The calculator has limits. It writes one fixed scale; it does not make spacing grow with the screen, which the CSS clamp() Generator can do for a single value. The names are numbers, not roles such as "gutter" or "inset", because roles depend on your product. Snapping can merge steps, as the page reports, so the step count you ask for is a maximum. And the scale cannot decide where each value belongs; that is still a design choice made one component at a time.