My Tool Studio
Text

Extract Numbers from Text

Use this tool to extract numbers from text and get each one on its own line, in the order it appears. It reads decimals and minus signs, and treats 1,234 and Indian-style 1,23,456 as single numbers, writing them without commas so they paste into a spreadsheet as values. Switch the number format to read European 1.234,56 instead. A dash between digits, as in a date, is read as a hyphen rather than a minus sign. Under the output you get the count, sum, average, median, minimum and maximum. Accountants pull figures out of invoices and students collect data points from a PDF, which you can open directly. Remove duplicates, keep whole numbers, sort, change the separator and download CSV.

Always freeNo sign upRuns in your browser

How to use

01

Paste the source text

Paste a report, invoice, log or table into the Input pane, or press Open file for a .txt, .csv, .docx or .pdf. Every number appears in the output as you paste. Try sample loads an invoice with prices, a percentage and a phone number.

02

Choose the options

Pick the Number format that matches your text. Tick Whole numbers only to skip decimals, Ignore minus signs, or Remove duplicates, and choose a Sort order such as low to high.

03

Copy, download or read the stats

Copy the list, pick a separator such as Comma or Tab, or download .txt or .csv. The stats row shows count, sum, average, median, min and max for the numbers currently listed.

Why Extract Numbers from Text

Worked example: an invoice with prices, dates and a phone number

The Try sample text is: Invoice 2024-117: 3 chairs at Rs 4,500 each, 1 desk at Rs 1,23,450 and delivery of $1,299.99. Discount -15.5% applied. Temperature dropped to -4 degrees. Call 98765 43210.

With the default options, the tool returns 11 numbers in this order: 2024, 117, 3, 4500, 1, 123450, 1299.99, -15.5, -4, 98765, 43210. The invoice number splits at the hyphen, the Indian-format price stays whole, and the phone number splits at the space.

The stats row shows a sum of 273,350.49, an average of 24,850.04, a minimum of -15.5 and a maximum of 123,450. In a real job you would delete the invoice number and phone number from the input first, so the sum covers only the prices.

How numbers are recognised

The rules below decide where one number ends and the next begins. They are designed for English and Indian number formats, where a comma groups digits and a dot marks decimals.

If your text uses a dot for thousands and a comma for decimals, choose the European number format. Numbers are written without separators in the output so spreadsheets read them as values.

In your textExtractedWhy
1,234,5671234567Groups of three after a comma are one number
1,23,45,67812345678Indian lakh and crore grouping is recognised
1,2,31 / 2 / 3Not a valid grouping, so each is separate
-15.5%-15.5Minus after a space is kept, % is dropped
2024-07-022024 / 07 / 02A dash after a digit is a hyphen
COVID-1919A dash after a letter is a hyphen
$1,299.991299.99Currency symbols are dropped
98765 4321098765 / 43210A space ends a number

Common questions

How does the number extractor handle 1,234 or 1,23,456?
With the default 1,234.56 number format, both are read as one number and written without commas: 1234 and 123456. Commas are only treated as separators when the digit groups follow a real pattern, so a list like 1,2,3 still gives three numbers. Choose 1234.56 to split at every comma.
Are negative numbers and decimals extracted correctly?
Yes. -4, 3.14159 and -15.5 come out exactly as written. A dash straight after a letter or digit is read as a hyphen, not a minus sign, so 2024-07-02 gives 2024, 07 and 02 rather than negative numbers.
Can I get the sum or average of numbers in my text?
Yes. The stats row under the options shows count, sum, average, median, minimum and maximum of the numbers currently listed. If Remove duplicates, Whole numbers only or Ignore minus signs is ticked, the stats use the filtered list.
Does the number extractor keep duplicate values?
By default, yes, because repeated values often matter when you are adding up a column. Tick Remove duplicates to list each value once. The summary line always shows how many numbers were found and how many are unique.
What happens to currency symbols and percent signs?
They are dropped and the number is kept. $1,299.99 becomes 1299.99 and 12.5% becomes 12.5. If you need to know which figure had which unit, extract from smaller pieces of text.
Why are phone numbers split into two numbers?
A space ends a number, so 98765 43210 comes out as 98765 and 43210, and +91 comes out as 91. Remove the spaces in phone numbers first if you need them whole.
Can the number extractor read European numbers like 1.234,56?
Yes. Choose 1.234,56 (European) in the Number format menu. Dots and spaces between groups of three digits are read as thousands separators and the comma as the decimal point, so 1.234,56 becomes 1234.56 and 2 000 becomes 2000.
How do I paste extracted numbers into Excel?
Keep the New line separator and click Copy, then paste into a single cell and Excel fills one row per number. Or download .csv and open it directly. Numbers have no thousands separators, so Excel reads them as values.
Is text sent anywhere when I extract numbers?
No. Everything runs in your browser. Financial reports and internal figures stay on your device.

More Text tools

View all