---
title: "Use the LEN Function to Calculate Characters in Text"
slug: "len-function"
description: "Learn to use the LEN function to calculate the number of characters in text fields in Pigment. "
updated: 2025-05-30T09:42:13Z
published: 2025-08-22T10:57:28Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://kb.pigment.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LEN function

## Description

Returns the number of characters in a Text.

## Syntax

`LEN(Text)`

## Arguments

| Argument | Type | Dimensions | Description |
| --- | --- | --- | --- |
| *Text* (required) | Text | Any Dimensions | Text to get the number of characters from. |

## Returns

| Type | Dimensions |
| --- | --- |
| Integer | Dimensions of *Text* |

## Examples

| Formula | Result | Description |
| --- | --- | --- |
| LEN(“text”) | 4 |  |
| LEN(“This is a sentence”) | 18 | There are 18 characters in the text, including the spaces. |

## See also

Excel: [LEN](https://support.microsoft.com/en-us/office/len-lenb-functions-29236f94-cedc-429d-affd-b5e33d2c67cb)

Related articles: [TEXT](/v1/docs/text-function), [MID](/v1/docs/mid-function)

<style> p[data-block-id] {font-size:1rem;} ul li p[data-block-id] {margin-bottom: 0;} ul[data-type="taskList"] li div p[data-block-id] {margin-bottom: 0;} ol li p[data-block-id] {margin-bottom: 0;} table tbody th p[data-block-id] { margin-bottom: 0;} blockquote p[data-block-id] {margin-bottom: 0 !important;} &nbsp;p[data-block-id]:empty::after {content: "\00A0";} </style>
