Extract Numbers from Text

Find all numbers in a text and add them up.

0 words · 0 charactersNot uploaded

Numbers

0Numbers
0Sum
—Average
—Minimum
—Maximum

Numbers out, totals in

Paste an invoice, a list of expenses, survey results or any text containing figures, and every number is pulled out in order. The tool recognises:

  • whole numbers and decimals (12, 3.75);
  • negative values (−40.25);
  • thousands separators in the English style (1,250.50 is read as one thousand two hundred fifty point five).

Then it calculates the count, sum, average, minimum and maximum: a quick way to total a column of figures pasted from an email or check that a report adds up.

Things to watch

Numbers inside dates, phone numbers and codes are extracted too (a date like 2024-03-05 yields 2024, -03 and -05 if negatives are on). Turn off Negative numbers for text with hyphenated codes, and remove lines you don’t want before summing. European formats that use a comma as the decimal mark (3,75) are read as two numbers.

Worked example

Here is what the Extract Numbers from Text returns for its built-in example. Settings used: Decimals: on; Negative numbers: on; Unique only: off. Click Try an example in the tool above to load it, then change it as you like.

Input
Invoice: 3 items at $1,250.50, shipping 25, discount -40.25. Order #2024 shipped in 2 boxes.
ResultValue
Numbers6
Sum3,264.25
Average544.041667
Minimum-40.25
Maximum2,024

Related tools: Email Extractor, URL Extractor.

Questions

How do I add up numbers in a block of text?

Paste the text; the sum of every number found is shown at the top, along with the count, average, minimum and maximum.

Does it understand 1,000.50?

Yes. Commas as thousands separators are recognised, and the value is read as 1000.5.

Last reviewed · How Textkiln tools work