Number Extractor

This number extractor pulls every number out of a block of text: integers, decimals, signed values, currency amounts and percentages. Paste any text to extract numbers from it, then copy the result as a clean list or a CSV. The count, sum, average, min, max, median, range and standard deviation update as you go.

Copied to clipboard
0Numbers found 0Sum 0Average 0Min 0Max 0Median 0Range 0Std dev

Number types

Keep

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. Under Keep, pick Whole numbers only to skip every decimal (3.14 is left out, not split into 3 and 14) or Decimals only to keep just the numbers with a decimal point. Include decimals only applies when All numbers is selected.

3. Choose whether to strip currency and percent

Numbers attached to $, €, £, ¥, or % are picked up automatically. Turn on Strip currency or Strip % suffix 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, median, range and standard deviation. Separate output with sets what goes between numbers in the output box: a new line (default), a comma, a space or a tab. With a comma, thousands commas are dropped so each number stays one item. Use Copy, Copy as CSV, or Download .txt to grab the result. Copy as CSV drops the thousands commas so each number stays one field (1,245,890 becomes 1245890). Copy as JSON and Download .json give a JSON array of the numeric values, such as [1245890,980000,27], without currency or percent signs.

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 gives you a quick total. 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.
  • Minus signs inside identifiers and ranges: a hyphen right after a letter or digit is not read as a minus sign. WDT-1250 gives 1250, and 2020-2024 gives 2020 and 2024.

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

The stat strip under the output box updates live as you extract. Eight 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.

Median, range and standard deviation

The median is the middle value once the numbers are sorted (with an even count, the average of the two middle values). The range is max minus min. The standard deviation shows how spread out the numbers are around the average; it is the population standard deviation, which treats the extracted numbers as the whole set (the same as STDEV.P in a spreadsheet).

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 % suffix 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.

Can I get the numbers as a JSON array or a comma-separated line?

Yes. Copy as JSON and Download .json give a JSON array of the numeric values, such as [1245890,980000,27]. For a comma-separated line, set Separate output with to Comma or use Copy as CSV; both drop thousands commas so each number stays one item.

Is there an input size limit?

No hard cap. The extractor handles inputs of several megabytes. The regex pass is fast, and the stats (including the median, which needs a sort) take only a moment even on long lists.

More wordcounter.ai tools

Other tools you might find useful.

Browse the full catalog →