Excel Number of Characters in a Cell: LEN and Range Totals
If you want the Excel number of characters in a cell, the fastest answer is the LEN function. In one formula, you can see how much text is in a cell, check whether an entry is too long, and build simple character-count workflows for content, data cleaning, or QA. Microsoft Support
Disclosure: This page contains affiliate links. If you buy through them, we may earn a commission at no extra cost to you.
Quick answer
Use =LEN(A2) to count the characters in cell A2. LEN returns the number of characters in a text string, and in Excel that count includes letters, numbers, punctuation, and spaces. Microsoft Support
If you need more than the one-cell answer, here are the formulas most people actually need in practice. They cover a single-cell count, totals across cells and counts without ordinary spaces. Microsoft Support
| Task | Formula | Scope |
|---|---|---|
| Count one cell | =LEN(A2) | Includes spaces |
| Total a range | =SUMPRODUCT(LEN(A2:A6)) | Counts the cells in this bounded range |
| Exclude ordinary spaces | =LEN(SUBSTITUTE(A2," ","")) | Removes U+0020 only |

Shorten over-limit text with QuillBot
Once Excel shows which cells are too long, rewrite them faster with paraphrasing, grammar, and summarizing help.
Try QuillBotHow to count characters in one Excel cell
The standard formula is =LEN(A2). Enter it in another cell, press Enter, and Excel returns the character count for A2. Microsoft notes that LEN counts spaces too, including spaces after the last visible character, so copied text can look shorter than the result suggests. Microsoft Support
- Select the result cell, for example B2.
- Type =LEN(A2).
- Press Enter.
- Drag the fill handle down if you want the count for the rest of the column. Microsoft Support
This works well for checking ad copy, product titles, imported records, or any workflow where text has to stay under a cap. When the result looks wrong, the cause is often hidden spaces, punctuation, or line breaks that LEN is correctly counting. Microsoft Support
How to count characters across multiple cells or a range
For separate cells, use =SUM(LEN(A2),LEN(B2),LEN(C2)). For a continuous range, use =SUMPRODUCT(LEN(A2:A6)). This avoids the legacy array-entry requirement of =SUM(LEN(A2:A6)).
This is useful when a paragraph is split across cells, when you import CSV text into multiple rows, or when you want a batch total before exporting content somewhere else. LEN measures each cell and SUMPRODUCT adds the results across the selected range. Microsoft Support
How to count characters in Excel without spaces
If you need the count without spaces, remove the spaces first and then count the remaining characters: =LEN(SUBSTITUTE(A2," ","")). This removes ordinary spaces only; tabs, line breaks and nonbreaking spaces remain.
Mistakes to avoid
- Assuming LEN ignores spaces. It does not. LEN counts spaces, including trailing spaces. Microsoft Support
- Forgetting Excel's hard limit. A cell can contain up to 32,767 characters, so very large imports can break even when formulas are correct. Microsoft Support
- Using a case-sensitive character formula when you need both cases. SUBSTITUTE is case-sensitive unless you normalize the text first with LOWER or UPPER. Exceljet
- Using counting instead of validation. If users must stay under a limit, a Text Length rule is usually safer than a helper column alone. Microsoft Support
FAQ
What formula counts the number of characters in a cell?
Use =LEN(A2). It returns the number of characters in the text string in A2, including spaces. Microsoft Support
How do I count characters in a whole range?
Use =SUMPRODUCT(LEN(A2:A6)) to total the characters in this range. Microsoft Support
How do I count characters but ignore spaces?
Use =LEN(SUBSTITUTE(A2," ","")). This removes ordinary spaces only; tabs, line breaks and nonbreaking spaces remain.
These formulas use English function names and comma separators; localized Excel versions may use different names or separators. LEN behavior for surrogate pairs depends on workbook compatibility, and it is not a reliable count of visible emoji or grapheme clusters.