Return the number of characters in a text string.
This function works the same in Google Sheets as it does in Excel — same syntax and arguments.
LEN(text)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)Result: 11
Counts the characters in the cell.
=LEN(A2)-LEN(TRIM(A2))Result: 2
Reveals how many extra spaces a cell has.
Yes — spaces count as characters. Wrap with TRIM first if you want to ignore leading/trailing spaces.