Return the number of characters in a text string.
Syntax
LEN(text)Arguments
textrequired
The string whose length you want.
LEN counts every character, including spaces. It's handy for validating field lengths (phone numbers, codes), spotting trailing spaces, and driving dynamic MID/RIGHT extractions.
=LEN(A2)→11Counts the characters in the cell.
=LEN(A2)-LEN(TRIM(A2))→2Reveals how many extra spaces a cell has.
Reference the text
Point LEN at the cell to measure.
Yes — spaces count as characters. Wrap with TRIM first if you want to ignore leading/trailing spaces.