Extract Numbers from Text
Pull every number out of text, including decimals, negatives, 1,234.56 or 1.234,56 formats and scientific notation, then sum and analyse them.
Tool guide
What this tool does
Extract Numbers from Text finds integers, decimals, negative values, numbers with thousands separators and scientific notation in any text. It lists them normalised or as written, and calculates the count, sum, mean, median, minimum and maximum.
Figures often arrive embedded in sentences: prices in an order confirmation, measurements in a lab note, amounts in a bank email or statistics in a report. Before you can add them up or paste them into a spreadsheet, they have to be separated from the words around them, and the separators must be interpreted correctly.
Choose how numbers are written in your text. In English style, “1,250.00” is one thousand two hundred and fifty; in most of continental Europe the same value is written “1.250,00”. Grouped digits are recognised in threes and in the Indian lakh-crore pattern, such as 1,42,86,000. Minus signs (including the typographic −), decimals and exponents like 6.022e23 can each be switched on or off. Numbers attached to letters, such as v2 or A4, are skipped. Values are parsed locally in your browser.
How to use Extract Numbers from Text
- Paste your text, or click Sample to load an example with prices, temperatures and large numbers.
- Choose the “Number format in the text” that matches how thousands and decimals are written.
- Switch decimals, negative signs and scientific notation on or off.
- Pick whether to output numbers normalised (1250) or as written (1,250.00).
- Optionally remove duplicates, sort, and set minimum or maximum values.
- Read the sum, mean and median below the result, and copy or download the list.
Tips for better results
- Choose a tab or new-line separator to paste the numbers straight into a spreadsheet column.
- Set a minimum of 1900 and a maximum of 2100 to pull out years from a history text.
- Use the custom separator “ + ” to produce a sum expression you can check in a calculator.
- Switch off negatives when hyphens in your text are used as ranges, such as “10-20 people”.
Common use cases
- Adding up the amounts in a pasted list of transactions or receipts.
- Collecting measurement values from a lab report for statistical analysis.
- Extracting order or invoice numbers from a batch of notification emails.
- Finding all years or quantities mentioned in a document for fact-checking.
Common mistakes to avoid
- Leaving the English format selected for European text, which reads “12,5” as the separate numbers 12 and 5.
- Counting phone numbers or dates as quantities; parts such as “020” or “12” in a date are separate numbers.
- Treating hyphenated ranges as negatives, which makes sums come out too low.
Frequently asked questions
Does it understand the Indian numbering system?
Yes. In English style, digits grouped in twos after the first three, as in 1,00,000 (one lakh) or 1,42,86,000, are recognised as single numbers and normalised to 100000 and 14286000.
Are percentages and currency symbols kept?
The symbols are not part of the number, so “82%” gives 82 and “£19.99” gives 19.99. Choose “As written” output to keep the original digits and separators, though symbols are still left out.
How is the median calculated?
All extracted values are sorted; the median is the middle value, or the average of the two middle values when the count is even. It is less affected by one very large or small number than the mean.
Why was a number like 3.14.15 only partly extracted?
A sequence with two decimal points is not a valid number, so only the first valid part is taken and digits directly after a decimal point are not treated as a new number. This is common in version strings and IP addresses.
Feedback & suggestions
Help us improve Extract Numbers from Text. We read every message.