Extract numbers from text

Useful for pulling amounts or quantities out of a copied message or invoice and adding them up.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter text and decimal style.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Each number is taken with its thousands separators (groups of 3 digits) and decimal part in the chosen style, plus a minus sign when it starts the word. Digits ٠ to ٩ become 0 to 9 and the total is the sum of the extracted numbers.

Example

Inputs: Decimal style = 1,234.56 (point is decimal). Result: Numbers: 1250.50 3 -20 15; Count: 4; Total: 1,248.5.

دفعت 1,250.50 ريال مقابل 3 قطع، واسترجعت -20 ريالا، والشحن ١٥
1250.50
3
-20
15

Limits and caveats

  • Numbers written as words, like ten, are not extracted.
  • In point-decimal style, a comma not followed by exactly 3 digits separates two numbers.
  • Dates and phone numbers come out as separate numbers.

Questions about this tool

Does it read Arabic-Indic numbers like ١٢٫٥?

Yes. It reads ٠ to ٩ and the Arabic decimal mark ٫ and writes the result with 0 to 9.

Why is 10-12 not read as a negative number?

A hyphen right after a digit marks a range, so a minus sign only counts when it starts the word.

When should I pick comma-decimal style?

When the text writes numbers the European way, like 1.234,56, with a point for thousands and a comma for the fraction.