123

Number Extractor

Extract integers, decimals, and negative values from text

Number Extractor — what it does

Pull every number out of a block of text, with options to include decimals and negative values, remove duplicates and sort the results numerically. It rescues the figures buried in prose, logs or reports and hands them back as a list you can total, chart or paste into a spreadsheet.

Worked example

A line from a quarterly summary run with the default options: Include decimals and Include negative values on, Unique and Sort off.

Input — text

Q3 summary (2026-10-20): revenue 1,250,000 up 4.5% on 3 new accounts; refunds -2,340.50; headcount 42, unchanged from 42.

Output — one number per line

3
2026
-10
-20
1250000
4.5
3
-2340.50
42
42

Q3 yields 3, the thousands separators in 1,250,000 are removed, and the date 2026-10-20 becomes 2026, -10 and -20 because the hyphens are read as minus signs.

When this tool helps

  • Extracting amounts from a paragraph of prose or an email to add them up.
  • Pulling numeric readings out of a log file for a quick analysis.
  • Collecting the figures cited across a report to check them against a source.

How to use it

  1. Paste the text containing numbers.
  2. Choose whether to include decimals and negatives.
  3. Enable deduplication and numeric sorting as needed.
  4. Extract and copy the resulting list.

Accuracy, limits, and good practice

  • Thousands separators split a number in two: 1,250 can extract as 1 and 250 unless you remove the separators first.
  • Turning off decimals treats 3.14 as two integers, which is occasionally what you want and usually not.
  • Currency symbols and units are left behind, so the output is bare numbers ready for arithmetic.

Frequently asked questions

Does it handle numbers written in words?

No. Only numeric characters are matched; "twenty-five" is text as far as extraction is concerned.

Are dates picked up as numbers?

Date components are digits, so they are extracted as separate numbers. Remove dates first if they would pollute the result.

How do I sum the extracted numbers?

Paste them into a spreadsheet column, or use the CSV column statistics tool once the list is saved as a file.

Why do dates, phone numbers and ID codes produce negative numbers?

With Include negative values ticked, any hyphen directly before a digit is treated as a minus sign, so 2026-10-20 extracts as 2026, -10 and -20, and 555-0199 as 555 and -0199. Untick the negative option when the text contains dates or hyphenated codes, or remove the hyphens first.

How do Unique and Sort decide what is equal?

Unique compares the extracted text after commas are removed, so 42 and 42.0 are kept as two different values while 1,250 and 1250 count as one. Sort orders by numeric value, ascending, which puts negatives first; it does not rewrite the values, so -0199 and 42.0 keep their zeros.

Related tools on this site

Everything above runs inside this page. Number Extractor needs no account, no upload, and no server round trip — close the tab and nothing is left behind.

數字提取器能做什麼

把一段文字裡的所有數字抽出來,可選擇是否包含小數與負值、是否去除重複、是否依數值排序。它把埋在文章、日誌或報告裡的數字救出來,交還成一份可以加總、製圖或貼進試算表的清單。

實際範例

季度摘要裡的一句話以預設選項執行:包含小數與包含負值開啟,去重與排序關閉。

來源:文字

Q3 summary (2026-10-20): revenue 1,250,000 up 4.5% on 3 new accounts; refunds -2,340.50; headcount 42, unchanged from 42.

提取後:每行一個數字

3
2026
-10
-20
1250000
4.5
3
-2340.50
42
42

Q3 會得到 3;1,250,000 的千分位逗號被拿掉;日期 2026-10-20 則因連字號被讀成負號而變成 2026、-10 與 -20。

什麼時候用得上

  • 從一段文章或郵件中抽出金額並加總。
  • 從日誌檔中撈出數值讀數做快速分析。
  • 收集報告中引用的各項數字,與來源核對。

使用步驟

  1. 貼上含有數字的文字。
  2. 選擇是否包含小數與負數。
  3. 視需要開啟去重與數值排序。
  4. 執行擷取並複製結果清單。

精確度、限制與實務建議

  • 千分位逗號會把一個數字切成兩半:1,250 若不先移除分隔符,可能被抽成 1 與 250。
  • 關閉小數會把 3.14 當成兩個整數,偶爾正是你要的,多數時候不是。
  • 貨幣符號與單位會被留下,因此輸出是可直接運算的純數字。

常見問題

會辨識用文字寫的數字嗎?

不會。只比對數字字元,「二十五」對擷取而言就只是文字。

日期會被當成數字抓走嗎?

日期各部分都是數字,會被分別抽出。若會干擾結果,請先移除日期。

怎麼把抽出的數字加總?

貼進試算表的一欄即可;或存成檔案後用 CSV 欄位統計工具處理。

為什麼日期、電話號碼和編號會產生負數?

勾選「包含負值」時,緊接在數字前的連字號會被視為負號,所以 2026-10-20 會提取成 2026、-10、-20,555-0199 會提取成 555 與 -0199。文字裡有日期或帶連字號的編號時,請取消勾選負值選項,或先把連字號拿掉。

去重與排序怎麼判定兩個值相等?

去重比較的是拿掉逗號後的文字,所以 42 與 42.0 會被視為兩個不同的值,1,250 與 1250 則算同一個。排序依數值由小到大排列,負數會排在最前面;排序不會改寫值本身,-0199 與 42.0 的零都會保留。

本站相關工具

以上步驟全部在這個頁面內完成,數字提取器 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。