Description
The LENG function returns the number of user-perceived characters (grapheme clusters) in a text value. Each emoji, flag, or composite character counts as one, regardless of how it is stored internally.
For most plain text, LENG returns the same result as LEN. The two functions differ for emoji, flags, and a few less common writing systems.
Usage
LENG(text)
| Argument | Type | Required | Description |
|---|---|---|---|
| text | Text | Yes | The input text |
Remarks
If the text argument is blank, then the result is 0.
When to use LENG instead of LEN
Use LENG when you want to count what the user sees, and the text may contain emoji or characters from scripts that combine multiple code points into one visible character.
| Input | LEN | LENG |
|---|---|---|
| "hello" | 5 | 5 |
| "😀" | 2 | 1 |
| "🏳️🌈" (rainbow flag) | 6 | 1 |
| "👨👩👧" (family) | 8 | 1 |
| "한글" (Korean) | 2 | 2 |
| "नमस्ते" (Hindi) | 6 | 4 |
If your text is restricted to letters, digits, and punctuation — for example registration codes, phone numbers, or reference IDs — prefer LEN. It is faster and matches Excel.
Relationship to LEFT, MID, and RIGHT
LEFT, MID, and RIGHT slice text using the same character count as LEN, not LENG. A formula like LEFT(TEXT, LENG(TEXT) - 1) will not behave as expected when TEXT contains emoji or other multi-code-point characters.
Example
To require that a multilingual LABEL field contains at most 20 visible characters in a validation rule:
LENG(LABEL) <= 20
This counts each emoji or composite character once, so a 20-character limit feels the same to a user typing in English, Korean, or with emoji.