Text

LEN

Definition

LEN returns the number of characters in a text string, counting spaces.

Syntax

=LEN(text)

Arguments

Argument Meaning
text The text, or the cell holding it, to measure.

Worked example

A sign-up form limits usernames in length, so you measure the entries in A2:A4.

A: Username
ember_fox
tidepool
kiwi99

Formula: =LEN(A2)

Result: 9. ember_fox has nine characters, and the underscore counts as one of them.

Practice

Cell A2 holds the phrase good morning, with one space between the words. Write a formula that returns its length.

  1. In B2, write a LEN formula for A2.
Step 1 of 2
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…

Related functions

LEN counts characters, and LEFT uses a character count to cut the start of a text, so the two work well together.

Common mistake

Forgetting that spaces count, so a name with an invisible trailing space reports one more character than the letters you can see.

Related functions

These links are related functions.