0
0
Figmabi_tool

Letter spacing and paragraph spacing in Figma - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Concept Flow
[Start with base text width] → [Count letters in text] → [Calculate spaces between letters = letters - 1] → [Multiply spaces by letter spacing value] → [Add result to base width] → [Apply paragraph spacing between paragraphs]
This flow shows how letter spacing increases the width of text by adding space between letters, and paragraph spacing adds vertical space between paragraphs.
Formula
Adjusted Width = Base Width + (Number of Letters - 1) * Letter Spacing

Formula to calculate the adjusted width of text after applying letter spacing.

Step-by-Step Trace
StepOperationInput/StateResultExplanation
1Count letters'Hello World' (ignore spaces)10Counting letters excluding spaces
2Calculate spaces10 letters9Spaces between letters is one less than letters
3Multiply spacing9 * 2px18pxLetter spacing times number of spaces
4Add to base widthBase Width + 18pxBase Width + 18pxFinal adjusted width including letter spacing
The adjusted width accounts for letter spacing by adding space between letters.
Variable Tracker
StepVariableValue BeforeValue After
1Number of LettersN/A10
2Spaces Between LettersN/A9
3Letter Spacing TotalN/A18px
4Adjusted WidthBase WidthBase Width + 18px
Key Moments
Why do we subtract one from the number of letters to get spaces?
What does paragraph spacing control?
How does letter spacing affect text width?
Sheet Trace Quiz - 3 Questions
Test your understanding
How many spaces between letters are counted for letter spacing in 'Hello World'?
A10
B9
C11
D8
Key Result
Letter spacing adds horizontal space between letters by multiplying the number of spaces (letters minus one) by the spacing value and adding it to the base text width. Paragraph spacing adds vertical space between paragraphs.
Transcript
We start by counting the letters in the text, ignoring spaces. Then, we calculate the number of spaces between letters, which is one less than the number of letters. Next, we multiply this number by the letter spacing value in pixels. Finally, we add this total spacing to the base width of the text to get the adjusted width. Paragraph spacing is separate and controls vertical spacing between paragraphs.