Back to Functions

LEN

Returns the length of a string.

TextLEN(text)

The LEN function in Google Sheets returns the length of a string, counting the total number of characters including spaces. It's one of the most frequently used text functions for validating data, extracting substrings, and cleaning up messy input. Dive into our comprehensive guide to master its application.

Parameters

  • text: The string whose length you want to calculate. Can be literal text or a cell reference.

Step-by-Step Tutorial

  1. Using LEN with literal text:

    • Example: =LEN("Hello World")
    • Result: 11
  2. Using LEN with a cell reference:

    • Example: If A1 contains "Google Sheets", then =LEN(A1) returns 13.

Video Example

Use Cases and Scenarios

  1. Data Validation: Check whether text entries meet a required minimum or maximum character count.
  2. Text Extraction: Combine LEN with functions like LEFT, RIGHT, or MID to extract substrings dynamically.
  3. Formatting Checks: Identify unexpectedly short or long entries, such as invalid phone numbers or codes.

Related Functions

  • TRIM: Removes leading, trailing, and repeated spaces from text.
  • LEFT: Returns a substring from the beginning of a string.
  • MID: Returns a substring from the middle of a string, starting at a given position.

Related Articles

Newsletter

More LEN examples coming soon.

We are building short, practical updates for Sheets power users.