Boneyard Tools

Extract Numbers From Text

Paste any text and the extractor lists every number it contains, one per line, and adds them into a running total. It handles whole numbers, decimals, negatives and comma-grouped thousands, converting 1,000 into 1000 so the sum is correct. Three switches let you turn decimals, thousands commas and negative signs on or off to match your data.

How to extract numbers

  1. Paste text, a list or a report into the Your text box, or start from the built-in sample.
  2. Leave Allow decimals on to capture values like 19.99, or turn it off for whole numbers only.
  3. Leave Allow thousands commas on so 1,000 is read as one number rather than 1 and 000.
  4. Toggle Allow negatives depending on whether a leading minus should count.
  5. Read the found count and sum above the results, then click Copy.

Examples

Mix of integer, negative decimal and grouped number

I have 3 cats, -2.5 kg, 1,000 items
3
-2.5
1000

Prices from an order line

Order 3 widgets at 19.99 each, save 1,250 total.
3
19.99
1250

Version string is truncated, glued numbers skipped

Release 1.2.3, ignore 12px, keep 7 items
1.2
7

Frequently asked questions

Which number formats are detected?

Whole numbers, decimals such as 2.5, negatives such as -7, and comma grouped numbers such as 1,000 or 1,234,567. Each of the three categories has its own switch, so you can disable any format your data should not include.

How is the sum calculated?

It totals every number found after commas are stripped and any minus sign is applied, so a mix of positive and negative values adds up correctly. The sum uses standard floating point, so long decimal chains can show tiny rounding artefacts.

Will it pull a number out of a word like abc123?

No. A digit run glued to letters, such as abc123 or 12px, is skipped so you only get standalone numbers. A word character directly before or after the digits blocks the match.

How are version strings like 1.2.3 handled?

Only the leading number is taken, here 1.2, and the trailing .3 is ignored, so version strings and dotted identifiers do not spray out false matches.

Are the numbers kept in order or sorted?

They are listed in the order they appear in your text, top to bottom. There is no sort option, so if you need them ordered, copy the output into a number or line sorter afterwards.

What happens to a minus sign that is really a dash?

A leading minus only counts as negative when nothing word-like sits before it, so 5-3 is read as 5 and 3, not as 5 and -3. Turn off Allow negatives to ignore minus signs entirely.

Does it understand currency symbols, percentages or scientific notation?

It ignores symbols like $, £ and % and reads only the numeric part next to them, so $19.99 yields 19.99. It does not parse scientific notation such as 1e6, which would be read as the number 1.

Is there a limit on how much text I can process?

There is no fixed limit. The scan and the sum run in your browser, so the ceiling is your device memory, and even long documents are handled almost instantly.

Is my text private?

Yes. Everything runs locally in your browser and nothing is uploaded to a server, so financial figures and reports never leave your device.

Learn more

Related tools