Extract Numbers from Text

Paste any block of text and pull every number out of it. Integers, decimals, signed values, currency amounts, or percentages. Copy the result as a clean list, a CSV, or just the sum of all numbers in the input.

Copied to clipboard
0Numbers found 0Sum 0Average 0Min 0Max

Number types

Sort by

Options

Private by default

Everything runs in your browser. Your text is not sent to a server.

How to extract numbers from text

1. Paste your input

Drop any text into the input box. Numbers can sit anywhere: in body prose, in tables, inside parentheses, glued to symbols. The extractor scans the whole input and pulls every match.

2. Pick what counts as a number

By default the extractor includes integers (1, 42, 1000), decimals (3.14, 0.5), signed numbers (-5, +12), and grouped numbers (1,234,567). Toggle each in the sidebar to narrow the catch. Turn off Detect grouped if you only want individual digits without comma grouping. Turn off Signed if you want positive-only.

3. Choose whether to strip currency and percent

Numbers attached to $, €, £, ¥, or % are picked up automatically. Turn on Strip currency or Strip percent to drop those symbols and keep only the numeric value (so $1,245 becomes 1,245 and 27% becomes 27).

4. Sort and copy

Pick first-appearance order (default), ascending, or descending. The stat strip shows count, sum, average, min, max. Use Copy, Copy as CSV, or Download .txt to grab the result.

When you need a number extractor

Pulling numbers out of prose comes up in surprisingly varied workflows.

Quick spreadsheet ingestion

An email or report with embedded figures becomes pasteable into a spreadsheet by extracting the numbers as one column. Combine with Copy as CSV for inline-list use.

Quick total of figures in a document

The Sum stat is the most-used field in this tool by far. Drop in a report, an expense email, or any text with dollar amounts and you get the total without manual data entry.

Cleaning up survey or form output

Free-text fields where users wrote "$1,245" or "1245.00" or "1.2k" all need normalization. The extractor handles the first two automatically; "1.2k" needs a manual pass.

Pulling product codes, SKUs, year ranges

Any text where the meaningful tokens are numeric (year ranges in catalog descriptions, SKUs, version numbers in a release note) becomes a clean list in one paste.

Verifying figures in a draft

Writers comparing source-data figures against draft prose extract the numbers from the draft, sort them, and visually compare against the source set.

What gets picked up (and what doesn't)

The extractor builds its regex from your toggle choices. Default behavior matches:

  • Plain integers: 5, 42, 1000
  • Grouped integers: 1,234, 1,234,567
  • Decimals: 3.14, 0.5, 1,234.56
  • Signed numbers: -5, +12, -3.5
  • Currency-prefixed: $1,245, €42.00
  • Percentage-suffixed: 27%, 3.5%

What the extractor does not match:

  • Written-out numbers: twelve, one hundred. Convert to digits first.
  • Scientific notation: 1.5e6, 2.3E-4. Convert to plain decimals first.
  • Roman numerals: IV, XII. Use a roman-to-integer converter first.
  • Numbers inside identifiers: WDT-1250 is matched as 1250 only if the dash is not adjacent. Switch off Detect grouped if you want stricter behavior.

Sum, average, min, max: built-in stats

The stat strip under the output box updates live as you extract. Five numbers are computed from the matched set:

Sum

The total of every extracted value. Grouped numbers (1,234,567) are summed correctly: the comma is treated as a thousands separator and stripped before parsing.

Average

The arithmetic mean (sum divided by count). Decimals are kept; the display rounds to two decimal places.

Min and max

The smallest and largest values in the extracted set. Signed numbers are compared as-is: -100 is smaller than 5.

Count

How many numbers were extracted total (after dedup, if dedup is on). Different from the input character count - that is the job of the character counter.

Currency and percent handling

Numbers in real-world text often come glued to a currency symbol or a percent sign. The extractor recognizes the common ones automatically and offers two options for what to do with them.

Currency: $, EUR, GBP, YEN

By default the symbol is kept as part of the display. The Strip currency toggle removes the prefix, so the output contains just the number ready for spreadsheet ingestion.

Percent suffix

Same logic. The Strip percent toggle drops the % sign and keeps the numeric value. Watch out: 27% becomes 27, not 0.27. If you need a decimal-form percentage, divide by 100 after extracting.

Mixed inputs

A document with both dollar amounts and raw percentages is handled in one pass. The display preserves the original prefix/suffix; the stats compute on the parsed numeric value (so a sum of $100 and 50% equals 150, which may not be what you want - separate the inputs by category before extracting in that case).

Deduplication and sort order

By default the extractor preserves every match in the order it appeared in the input. Two options change that behavior.

Drop duplicates

Removes repeated numbers. Matching uses the displayed string, so $100 and 100 are treated as different. Strip currency first if you want them deduped together.

Sort ascending or descending

Reorders the output by numeric value. Useful when you want to see the largest or smallest extracted number first, or to feed the result into a downstream tool that expects sorted input.

Related tools

Frequently asked questions

Does the extractor handle written-out numbers like 'twelve'?

No. Only digit-based numbers are matched (1, 12, 1.5, $100, 27%). Written-out numbers (twelve, one hundred, three and a half) are skipped. For digit conversion, run the text through a word-to-number converter first, then paste the result here.

Why is 1,234 picked up as one number but 1,234,567,89 only partial?

The grouped-number regex matches valid thousands groupings: 1 to 3 digits, then groups of exactly 3 digits, no more. 1,234 and 1,234,567 are both valid. 1,234,567,89 is malformed (the last group is only 2 digits) and is parsed as two numbers: 1,234,567 and 89.

Does the text leave my browser?

No. The extractor runs entirely in your browser using JavaScript. Your input, the matches, and the stats are never sent to our servers and are not logged.

How are negative numbers handled in the sum?

If Include signed is on, negative numbers are extracted as-is and contribute to the sum with their sign (so $100 plus -$30 sums to 70). If Include signed is off, the minus sign is not matched and only the digits after it are extracted, which gives a wrong sum. Keep signed on for financial text.

Can I extract only percentages?

Not directly. The extractor grabs every number. To get only percentages, paste the input and visually scan the display column (matches keep their % suffix so they are easy to spot), or use the Drop duplicates and Sort ascending toggles to group them, then trim manually.

Why is 1.2k not extracted as 1200?

Shorthand suffixes (k for thousand, M for million, B for billion) are not parsed. The extractor reads 1.2 and stops at the k. Expand the source before pasting, or do a find-and-replace pass to convert k to 000.

Does sum work on currency amounts in different currencies?

The sum is a raw numeric sum that ignores the currency symbol. Adding $100 and €100 gives 200, not 'mixed currency'. If your text has multiple currencies, separate them by currency before summing.

Is there an input size limit?

No hard cap. The extractor handles inputs of several megabytes. The regex pass is fast and the stat computations are O(n).

More wordcounter.ai tools

Other tools you might find useful.

Browse the full catalog →