Add Numbers in Text
Results
Instructions
Like many of the tools on this site this one came about because of a pretty niche task that I needed to do. I had a bunch of text that had numbers in it and I needed to add them all up. I could have done it by hand but that would have been a pain. So I wrote this tool to do it for me.
You can either type, paste, or upload the text contents into the text field above. The sum of any numbers found will be displayed in the gray box under the Results heading.
It will look for either whole numbers or decimals. If you also need a count of the words or characters in the same block of text, the word counter processes any pasted text instantly.
Example
Input:
Invoice items: 12 units at 4.5 each, plus a 30 flat fee and 8 in tax.
Numbers found: 12, 4.5, 30, 8 Sum: 54.5
The tool finds every standalone number regardless of where it appears in the sentence — it doesn't require numbers to be on their own line or separated by commas.
Common Uses
Adding up numbers scattered across a document — Receipts, invoices, and reports often have numbers mixed into sentences rather than laid out in a clean list or spreadsheet. Pasting the whole block here saves manually pulling each number out first.
Quick totals from copied text — If you've copied text from a PDF, email, or web page and just need a fast total, this avoids retyping every value into a calculator by hand.
Checking a list of numbers for a running total — Paste a list of scores, prices, or measurements — one per line or all in one paragraph — and get the sum immediately as you type.
How It Works
The tool scans the text for any sequence of digits, optionally including a decimal point (matching patterns like 42 or 3.14), and adds each one found to a running total. Numbers embedded in words (like a product code such as SKU42) are still matched as 42, so review the result if your text contains that kind of alphanumeric code mixed in with genuine values.
Frequently Asked Questions
Does it handle negative numbers?
No — the tool matches digit sequences and decimal points, but not a leading minus sign, so a negative number like -5 is added as positive 5.
Does it handle commas as thousands separators, like 1,000?
No — a comma breaks the match into two separate numbers (1 and 000), so remove thousands separators before pasting if your text uses them, or the total will be off.
Can I upload a file instead of pasting text? Yes — the text box accepts typed, pasted, or uploaded text content.
Is there a limit to how much text I can paste? No hard limit — this tool runs entirely in your browser, so very large documents (tens of thousands of words) may take a moment longer to process depending on your device.
Is my text sent anywhere? No. All parsing and math happens locally in your browser with JavaScript — nothing you type or upload is sent to a server.