Extract Numbers from Text
Pull every number out of pasted text with explicit rules for signs, decimals and thousands separators, plus instant sum, count, min, max and average.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Paste the text containing the numbers you want to extract.
- 2.Adjust the rules if needed: signs, thousands separators, scientific notation, de-duplication.
- 3.Choose list or statistics output, check the found count, and copy the result.
About Extract Numbers from Text
Extract Numbers from Text pulls every number out of whatever you paste, from invoices and reports to log files and survey exports, and hands them back one per line, comma-separated, or summarized as count, sum, minimum, maximum and average. It completes this site's extractor family alongside the email, URL and phone extractors, and like them it runs entirely in your browser: nothing is uploaded, stored or attached to an account.
What counts as a number is a set of explicit, switchable rules rather than a guess. Integers and decimals are recognized by default, including negative values, a leading plus, and bare decimals written without a leading zero. The sign rule is deliberately careful: a minus is kept only when it is genuinely attached to the number, at the start of a line, after whitespace or after an opening bracket or comparison, so the arithmetic expression 5-3 yields five and three rather than five and minus three. Thousands separators are understood when the grouping is well formed, so 1,000,000 is one number rather than three fragments, and the toggle lets you switch to literal digit-run extraction when your data uses commas differently. Scientific notation sits behind its own toggle, off by default, because 1e5 in ordinary prose is more often a typo or an identifier than a hundred thousand.
Numbers embedded in other text are extracted wherever they occur: item123 yields 123, $19.99 yields 19.99 and 50% yields 50, because the job of a number extractor is to find every number, not to judge its context. Only ASCII digits are recognized, a stated scope boundary: full-width digits and other scripts' numerals pass through unextracted, and the page says so rather than half-supporting them. A dedupe toggle collapses repeated values while preserving first-seen order.
The statistics block is computed with ordinary JavaScript double-precision arithmetic, and the page is honest about what that means: sums of clean decimals can carry the familiar floating-point residue, which matters at the fifteenth significant digit and not before. The count is exact, and an input with no recognizable numbers is reported as exactly that rather than treated as an error.
Input is capped at one million characters and processes in a single linear pass, so large pastes return instantly. Every extraction reports how many numbers were found, so the output is auditable against your expectation before you copy it onward. The extraction grammar itself is pinned by more than twenty test cases written before the implementation, covering the sign boundary, malformed grouping, currency, percentages, embedded digits and line-ending variants, so the rules stated on this page are the rules the tool actually applies.
Use it to lift figures out of a report for a spreadsheet, total the amounts scattered through an invoice or log, check the range of measurements in pasted data, or simply de-noise a document down to its numeric content. What it deliberately does not do is interpret: no currency conversion, no unit awareness, no date parsing, and no guessing about what a number means, because an extractor you can trust is one whose rules you can read.
Methodology & sources
Scan the text in a single pass with an explicit number grammar covering signs, decimals, well-formed thousands grouping and optional scientific notation, apply the documented attachment rule for signs, and compute statistics in double precision with the limits stated on the page.
Frequently asked questions
- How does it handle 5-3, is that one number or two?
- Two: five and three. A minus is kept only when genuinely attached, at a line start, after whitespace or after an opening bracket, so arithmetic expressions are not misread as negative numbers.
- Is 1,000,000 one number or three?
- One, when the grouping is well formed and the thousands-separator toggle is on. Malformed grouping splits at the malformation, and switching the toggle off extracts literal digit runs instead.
- Why does the sum sometimes show a tiny decimal residue?
- Statistics use standard double-precision arithmetic, so sums of decimals can carry floating-point residue at the far end of the precision range. The count is always exact, and the page states this limit rather than hiding it.
Related tools
- Email ExtractorExtract, case-insensitively deduplicate, and optionally sort practical email addresses from pasted text locally.
- URL ExtractorExtract, normalize, and deduplicate HTTP, HTTPS, and www links from up to one million characters without uploading the source text.
- Phone Number ExtractorFind and deduplicate phone-shaped number candidates in pasted text locally, while preserving their original formatting.
- Add Line Numbers to TextNumber every line of pasted text from a chosen starting value with a custom separator and optional zero padding.
- Add Prefix and Suffix to LinesAdd literal prefix and suffix text to every pasted line, with an option to leave blank lines untouched.
- Add Quotes to Each LineTurn a pasted list into a paste-ready JSON array, SQL IN clause or CSV row in one click, with the escaping each format actually requires.
Text Tools guides
View all- How to Find and Replace Text in AutoCAD
- How to Get All Links from a Word Document
- How to Remove Emoji from a Facebook Post
- Emoji Copy and Paste: Find and Copy Any Emoji Instantly
- How to Create a Batch File from a Text File Locally
- How to Change Case in Google Docs and Beyond
- How to Get Bold Text in WhatsApp Messages
- Add a Prefix to All Lines in Notepad++ and Online
- How to Add Line Numbers to Text in Word and Plain Text
- How to Add Line Numbers in Word and Plain Text
- Remove Duplicate Lines from Text in One Click
- How to Generate Random Words in HTML Pages
- Extract Phone Numbers from Any Text in Minutes
- Convert Numbers to Words in Excel Without Formulas or VBA
- How to Generate Lorem Ipsum in Canva for Faster Mockups
- How to Random List in Python Without Writing Code
- How to Count Lines in a Play Using a Browser Tool
- Remove Line Breaks from Text in Excel in One Simple Step
- Convert Brake Line Symbols to Literal Text for Code or Data
- Cute Kaomoji Copy and Paste for Roblox Chats and Bios