Skip to content

Number Extractor

Paste a paragraph, an invoice, a survey answer or a log, and the tool lists every number it finds, in the order they appear, with the count, sum, average, minimum and maximum underneath. Thousands separators such as 1,240 can be read as one number. Free, no sign-up, and the text never leaves your browser.

Options

How to Use the Number Extractor

  1. Paste your text. The numbers can sit anywhere inside the words. Results update as you type.
  2. Decide how to read commas. With Treat 1,234 as one number ticked (the default), a comma followed by exactly three digits is read as a thousands separator. Untick it if your commas separate different values.
  3. Choose the output format. One per line, or Comma-separated for one row.
  4. Read the statistics and copy. Count, Sum, Average, Minimum and Maximum appear under the list. They are rounded to four decimal places for display; the list itself is not rounded.

What Counts as a Number

The tool finds whole numbers and decimals written with a point, such as 7 and 3.14159, with an optional minus sign directly in front. A number comes out as the value it represents, so 007 becomes 7 and 1.50 becomes 1.5. Everything around a number is ignored: the % in 12.5%, the $ in $2,500, units, and words.

With the thousands option on, 1,240 and 1,000,000 are single numbers. With it off they split at each comma, so 1,240 gives 1 and 240. Only a comma followed by exactly three digits is treated as a separator. A decimal comma, as in 3,14, is not understood either way and is read as 3 and 14.

A Worked Example

Input

Revenue grew 12.5% to 1,240 units, up from -3 the prior year.

Output (thousands option on)

12.5
1240
-3

Count 3, sum 1,249.5, average 416.5, minimum −3, maximum 1,240. Untick the thousands option and the same sentence gives four numbers, 12.5, 1, 240 and −3, with a sum of 250.5, an average of 62.625 and a maximum of 240. The difference is the whole reason the option exists: decide which reading your text needs before you trust the sum.

Common Mistakes: Hyphens, Ranges and Dates

A minus sign counts only at the start of the text or straight after a space, line break, opening bracket or opening quote. A hyphen between two characters is not a sign, so ranges and dates come out as positive numbers:

In your textNumbers extractedWhat happened
pages 10-2010, 20The range's hyphen is not a minus sign
2024-05-122024, 5, 12A date splits into three positive numbers
profit -3 and (-4)−3, −4A minus after a space or an opening bracket is a sign
3.5% rise, ID 0073.5, 7% is ignored and leading zeros are dropped
1/21, 2A fraction is two numbers, not 0.5
1e31, 3Scientific notation is not understood

A negative number glued to the word before it, as in temp-5, is read as 5, because the hyphen looks like part of a compound. Put a space before the minus, or replace the hyphen with a space using the Find and Replace tool. An en dash, as in 10–20, is never a minus sign.

Which Tool Do You Need?

If you want…Use
Numbers found inside text, with a sum and averageThis page
A list of numbers put in ascending or descending orderNumber Sorter
Mean, median, mode, variance and standard deviation of a data setStatistics Calculator
Email addresses or links found inside textEmail Extractor, URL Extractor
A number's spelling in wordsNumber to Words

Frequently Asked Questions

How do I extract numbers from text?
Paste the text into the box. Every integer and decimal appears at once, one per line or comma-separated, in the order they occur in the text, with a count and summary figures beneath. Use Copy Result to take the list.
Can I add up all the numbers in a text?
Yes. The Sum card totals every number found, and Average, Minimum and Maximum sit beside it. Check that the thousands option matches your text, since 1,240 is one number or two depending on it.
Does it find negative numbers and decimals?
Yes. A minus sign directly before a digit makes the number negative when it starts the text or follows a space, line break, opening bracket or opening quote, and a point followed by digits makes it a decimal. A hyphen inside a range or a date is not treated as a minus sign.
Why are the numbers in my dates and ranges positive?
In 2024-05-12 each hyphen sits between two characters, so it is read as a separator and the tool returns 2024, 5 and 12. Only a minus that starts the text or follows a space or opening bracket makes a number negative.
Does it handle percentages, currency and units?
It returns just the number: 12.5% gives 12.5 and $2,500 gives 2500. The symbol is ignored, so the tool cannot tell you what a figure was measured in.
Does it read numbers written as words, like "twelve"?
No. Only digits are recognised. Words such as twelve, or Roman numerals, are left alone.
Is my text uploaded?
No. The scan and the sums are done in your browser, and nothing is sent or stored.

Related Tools

More in Text Cleanup & Formatting

See all Text Cleanup & Formatting