> For the complete documentation index, see [llms.txt](https://docs.inforiver.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inforiver.com/formula-syntax/text-formatting-functions/length.md).

# LENGTH

The **LEN** function returns the total number of characters in a text string, including letters, numbers, spaces, and special characters. It is commonly used to measure text length, validate input, or prepare data for further processing.

### Syntax

```
LEN(text)
```

### Arguments

text- The text string or cell reference whose length you want to calculate. Required.

### **Return value**

A numeric value representing the total number of characters in the text.

### **Example**

```
LEN([Product Name])
```

In the example below, the **LEN** function calculates the length of the *First Product Name* field. The function returns the number of characters in each product name, including letters, spaces, and punctuation. This helps analyze or filter data based on text length.

<figure><img src="/files/VfWASSeaPRD3foVN66Vf" alt=""><figcaption><p>Applying len function</p></figcaption></figure>

### **Excel equivalent**

[**Length**](https://support.microsoft.com/en-us/office/len-function-29236f94-cedc-429d-affd-b5e33d2c67cb)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inforiver.com/formula-syntax/text-formatting-functions/length.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
