Extract numbers from text

Paste any text and get all the numbers in it as a list, together with their sum, average, minimum and maximum. Decimals and thousands separators are understood in both styles.

  • Free
  • No sign-up
  • Runs in your browser
extract-numbers

100% private — your text is processed in your browser and never sent to any server.

How it works

Paste your text

An invoice, a report, a list of expenses, a log or any text with figures in it.

Check the decimal style

Leave it on automatic, or force a point or a comma.

Copy the numbers

Take the list, or read the sum and the average from the counters.

All the figures in a text, and what they add up to

Numbers are mixed into the text around them: the amounts in the lines of an invoice, the scores in a report, the times in a log, the prices in a message or the quantities in a recipe. Finding them means reading everything, and adding them up means typing each one into a calculator. This tool picks every number out of the text for you and, as a bonus, tells you their sum, average, smallest and largest values.

Different ways of writing the same number

The tricky part of numbers is punctuation. English-speaking countries write 1,234.56 and Spanish speakers write 1.234,56; the two use the same characters with opposite meanings. The tool recognises both when they contain both signs, because the last one is the decimal separator. When a number has a single sign, as in 3.5 or 1.234, it decides from the digits that follow: exactly three digits after the sign suggests a thousands separator, and other cases suggest a decimal. When the guess could be wrong, force a decimal point or a comma and the whole text is read that way.

What is counted

Whole numbers, decimals, negative numbers and numbers with a plus sign are all found, wherever they are in a sentence. Digits that are part of a longer word, such as A4, mp3 or ID42, are found as well unless you tick "Ignore numbers stuck to letters". Repeats are kept by default, since they matter for the sum; tick "Remove repeated results" if you only want the distinct values.

The sum, average and range

The counters show the sum, average, smallest and largest of every number found, computed from the values, not from the text. If you want the numbers written in a uniform style for a spreadsheet, choose "Plain numbers", which writes them with a point as the decimal separator and no thousands separators.

What it does not do

The tool cannot know what a number means. Dates such as 12/05/2024, phone numbers and postcodes are also numbers, and they will be included, and they distort the sum. Numbers written in words, in Roman numerals or with a currency symbol attached to the digits are handled as digits only. Review the list if the text is not purely figures.

Frequently asked questions

How do I extract all the numbers from a text?
Paste the text and the numbers appear in the results box, one per line. The counters show their sum, average, smallest and largest.
Does it understand 1,234.56 and 1.234,56?
Yes. When both signs appear, the last one is the decimal separator. For a number with only one sign it guesses from the digits, and you can force point or comma.
Are negative numbers found?
Yes, numbers with a minus sign are found and counted as negative in the sum.
Can I add up all the numbers in a text?
Yes. The "Sum of all found" counter adds every number found. Repeats are included.
Why are dates and phone numbers included?
The tool does not know what each number means. Every run of digits is a number, so remove those from the text or from the results.
Is my text uploaded anywhere?
No. It is processed in your browser.