Skip to Content

How to Use the LEN Function in Google Sheets

There are some functions that are essential for anyone that regularly uses spreadsheet programs like Google Sheets or Microsoft Excel.

The LEN function is one such function. This text function can be used to count the number of characters in a cell and can be combined with other functions to do many useful things.

In this tutorial, I will show you how to use the LEN function in Google Sheets.

Table of Contents

What is the LEN Function?

The LEN function will return the length of a string. In other words, it will count the characters in a cell.

The syntax of the LEN function is:


  • text – this is the string that you want to return the length of (or count the characters of)

It’s important to note that LEN will count all the characters in a cell including the spaces.

Using the LEN Function

LEN is a pretty simple function to use by itself since it only accepts one argument. You can put the cell reference to the text you want to count, or put the text into the function itself.

Here is a basic example of how this may be used in a spreadsheet:

LEN function example

In the example above, pay attention to how LEN counts punctuation and spaces. Each line has another character so that you can see just how this function works.

By itself, LEN will count the characters in one cell, but if you want to count the characters in a range of data, you can do this by combining LEN with the SUMPRODUCT function.

To combine these to count the characters in a range of data you will need to use this syntax:


  • text – the range of cells that you want to count characters for.

Essentially this is the same as using LEN by itself but you are wrapping the function in SUMPRODUCT

Here is an example of this used in Google Sheets:

Count Characters in Range

You can see that by combining these two functions you can now return the length of the strings in an entire range.

To learn more about this function read our post on using the SUMPRODUCT function. 

Closing Thoughts

LEN is a very simple function, that at first might not seem incredibly useful by itself.

The real power of LEN comes from when you combine it with different functions.

Take a look at some of the resources below that show ways LEN is used in combination with other functions to do some pretty powerful things.

More Google Sheets Tutorials:
How to Extract Numbers or Text from a String
How to Remove the Last Character
How to Use the FIND Function