---
title: "LEN function in Excel: syntax and examples | PracticeExcel"
description: "How to use LEN in Excel and Google Sheets: count characters, and spot extra spaces."
canonical_url: "https://practiceexcelonline.com/functions/len"
locale: en
meta:
  "og:description": "How to use LEN in Excel and Google Sheets: count characters, and spot extra spaces."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~TEVOIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBMRU4gaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IGNvdW50IGNoYXJhY3RlcnMsIGFuZCBzcG90IGV4dHJhIHNwYWNlcy4%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_LEN(text)%2Cp_Ii9mdW5jdGlvbnMvbGVuIg%2Cs_6lFb21odWXtLidEc.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "LEN function in Excel: syntax and examples | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~TEVOIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBMRU4gaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IGNvdW50IGNoYXJhY3RlcnMsIGFuZCBzcG90IGV4dHJhIHNwYWNlcy4%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_LEN(text)%2Cp_Ii9mdW5jdGlvbnMvbGVuIg%2Cs_6lFb21odWXtLidEc.png"
---

> Index of every page on this site: [llms.txt](https://practiceexcelonline.com/llms.txt)

# **The LEN function**

Returns the number of characters in a text, spaces included.

=

LEN(

## **Syntax**

```
LEN(text)
```

<dl><dt>**text **</dt>
<dd>The text or cell to measure.</dd></dl>

## **Examples**

C1=LEN(A2)

|  | A | B | C |
| --- | --- | --- | --- |
| 1 | City |  | **10** |
| 2 | Copenhagen |  | |

C1=LEN(" hi ")

|  | A | B | C |
| --- | --- | --- | --- |
| 1 | City |  | **6** |
| 2 | Copenhagen |  | |

## **Practice LEN**

- [**1****Drop a prefix with RIGHT and LEN**→](https://practiceexcelonline.com/practice/left-right-mid/right-len-remove-prefix)
- [**2****Count the words in a cell**→](https://practiceexcelonline.com/practice/find-search/count-words-in-cell)

## **Read the guide**

- [**How to clean data in Excel with formulas**](https://practiceexcelonline.com/learn/clean-data-in-excel)
- [**How to create a drop-down list in Excel, and make it update itself**](https://practiceexcelonline.com/learn/drop-down-list-excel)

## **Related functions**

- [**TRIM**](https://practiceexcelonline.com/functions/trim)
- [**LEFT**](https://practiceexcelonline.com/functions/left)
- [**MID**](https://practiceexcelonline.com/functions/mid)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://practiceexcelonline.com/#identity","@type":"Organization","name":"PracticeExcel","url":"https://practiceexcelonline.com/","logo":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/#website","@type":"WebSite","inLanguage":"en-US","name":"PracticeExcel","url":"https://practiceexcelonline.com/","alternateName":["Practice Excel Online","PracticeExcelOnline.com"],"publisher":{"@id":"https://practiceexcelonline.com/#identity"},"workTranslation":{"@id":"https://excelopgaver.dk/#website"}},{"@id":"https://practiceexcelonline.com/functions/len#webpage","@type":"WebPage","description":"How to use LEN in Excel and Google Sheets: count characters, and spot extra spaces.","name":"LEN function in Excel: syntax and examples","url":"https://practiceexcelonline.com/functions/len","breadcrumb":{"@id":"https://practiceexcelonline.com/functions/len#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/functions/len"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/functions/len#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Excel functions","item":"https://practiceexcelonline.com/functions","position":2},{"@type":"ListItem","name":"LEN function in Excel: syntax and examples","position":3}]},{"@id":"https://practiceexcelonline.com/functions/len#article","description":"How to use LEN in Excel and Google Sheets: count characters, and spot extra spaces.","headline":"LEN function in Excel: syntax and examples","inLanguage":"en-US","thumbnailUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~TEVOIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBMRU4gaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IGNvdW50IGNoYXJhY3RlcnMsIGFuZCBzcG90IGV4dHJhIHNwYWNlcy4%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_LEN(text)%2Cp_Ii9mdW5jdGlvbnMvbGVuIg%2Cs_6lFb21odWXtLidEc.png","@type":["Article","TechArticle"],"author":{"@id":"https://practiceexcelonline.com/#identity"},"image":{"@id":"https://practiceexcelonline.com/#/schema/image/1"},"isPartOf":{"@id":"https://practiceexcelonline.com/functions/len#webpage"},"mainEntityOfPage":{"@id":"https://practiceexcelonline.com/functions/len#webpage"},"publisher":{"@id":"https://practiceexcelonline.com/#identity"}},{"@id":"https://practiceexcelonline.com/#logo","@type":"ImageObject","caption":"PracticeExcel","contentUrl":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png"},{"@id":"https://practiceexcelonline.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~TEVOIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBMRU4gaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IGNvdW50IGNoYXJhY3RlcnMsIGFuZCBzcG90IGV4dHJhIHNwYWNlcy4%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_LEN(text)%2Cp_Ii9mdW5jdGlvbnMvbGVuIg%2Cs_6lFb21odWXtLidEc.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~TEVOIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBMRU4gaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IGNvdW50IGNoYXJhY3RlcnMsIGFuZCBzcG90IGV4dHJhIHNwYWNlcy4%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_LEN(text)%2Cp_Ii9mdW5jdGlvbnMvbGVuIg%2Cs_6lFb21odWXtLidEc.png"}]}
```

## Sitemap

See the full [sitemap](https://practiceexcelonline.com/sitemap.md) for all pages.
