How to Do Character COUNT in Excel

There are two ways to “do character count in excel”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

In Excel: use =LEN(A2) for characters including spaces, =LEN(SUBSTITUTE(A2," ","")) to exclude spaces, and =LEN(TRIM(A2))-LEN(SUBSTITUTE(A2," ",""))+1 to count words.

On this page7
▤Annotated stepsExcel
1

For characters including spaces, enter =LEN(A2) beside the text and fill down.

2

To exclude spaces, wrap it: =LEN(SUBSTITUTE(A2," ","")).

3

For words, use =LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))+1 — the TRIM is what makes double spaces safe.

4

To count one specific character, subtract the SUBSTITUTE length for that character instead of a space.

5

For a whole column at once, use =SUMPRODUCT(LEN(A2:A100)) rather than summing a helper column.

6

Guard against blank cells with =IF(A2="",0,…) so an empty row does not report one word.

=LEN(A2)
Ctrl+CthenCtrl+Shift+V⌘+Cthen⌘+Ctrl+VPaste values · WindowsMac

What this does

LEN returns the number of characters in a cell, counting spaces and punctuation. Excel has no WORDCOUNT function, so words are counted indirectly: remove every space with SUBSTITUTE, subtract the shortened length from the original, and the difference is the number of spaces — one fewer than the number of words. TRIM first, or double spaces inflate the count. To count one specific character, the same subtraction works on that character instead of a space. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “do character count in excel”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the outcome you expected before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a text operation that turns messy entries into clean, usable data, but the practical win is that someone else can open the file and understand what happened without asking you.

A worked example

A2 holds "Quarterly sales report". =LEN(A2) returns 22. Without spaces: =LEN(SUBSTITUTE(A2," ","")) returns 20. Word count: =LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))+1 returns 3. To count how many commas are in A2: =LEN(A2)-LEN(SUBSTITUTE(A2,",","")). To total characters down a whole column: =SUMPRODUCT(LEN(A2:A100)). Character limits are everywhere — SMS fields, meta descriptions, import columns with a fixed width — and LEN is how you check a column against one before the upload fails. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.

In Google Sheets

The standard worksheet functions used by this example are listed in Google Sheets. Check the cell references, argument separators and input types in the target spreadsheet, then compare the worked result. This formula-availability check does not establish identical menus, keyboard shortcuts or workbook features, and it is not a product execution test. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. For “do character count in excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.

Common mistakes

  • Expecting a WORDCOUNT function — Excel has none; the SUBSTITUTE subtraction is the standard idiom.
  • Counting words without TRIM, so two spaces between words inflate the result by one each time.
  • Forgetting that LEN counts trailing spaces, which is why a cell that looks 5 characters long reports 6.
  • Running the word formula on an empty cell, which returns 1 instead of 0.
  • Using LEN on a number and being surprised by the count — it measures the underlying value, not the formatted display.

Frequently asked questions

How do I count characters in Excel?

=LEN(A2) returns the character count including spaces. Use =LEN(SUBSTITUTE(A2," ","")) to exclude them.

How do I count words in a cell?

=LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))+1. It counts the spaces and adds one; TRIM stops double spaces from inflating the total.

How do I count one specific character?

Subtract the length without it: =LEN(A2)-LEN(SUBSTITUTE(A2,"x","")) counts how many times "x" appears. SUBSTITUTE is case-sensitive.

How do I count characters in a whole column?

=SUMPRODUCT(LEN(A2:A100)) totals the character count across the range in a single formula.