🧮

Token 計數 & API 成本計算機

貼上文字即時估算 token 數,並比較各大 LLM API 的輸入/輸出費用。
0
輸入 tokens
0
字元數
各模型成本比較(USD)
模型 輸入 $ 輸出 $ 總計 $
※ 價格為每 1M tokens 的參考單價,可能變動,請以各官方公告為準。Token 數為估算值(以 GPT 系列分詞為基準),實際依模型而異。
推薦好物
📚
Co-Intelligence(AI 暢銷書)紐時暢銷 · 搞懂如何與 AI 協作
🎧
Soundcore Q20i 降噪耳機專注工作 · 聽 ambient 音樂的好夥伴
含 Amazon 聯盟連結,透過連結購買我們可能獲得回饋,不影響你的價格。As an Amazon Associate we earn from qualifying purchases.
FAQ · 常見問題
Token 是怎麼計算的? / How are tokens counted?

本工具用 GPT 系列分詞器估算 token 數,不同模型實際分詞略有差異,數字僅供參考。Tokens are estimated using a GPT-style tokenizer; actual counts vary slightly by model.

這個工具免費嗎? / Is it free?

完全免費,全部在你瀏覽器本機運算,不會上傳任何文字。Completely free and runs locally in your browser; your text is never uploaded.

顯示的 API 價格準確嗎? / Are the API prices accurate?

價格為各模型每百萬 token 的參考單價,可能變動,請以官方公告為準。Prices are reference rates per 1M tokens and may change; always check official pricing.

更多免費工具 · More tools
🖥️ LLM VRAM🧮 Token 成本🖼️ 出圖尺寸📝 Prompt 庫🍅 番茄鐘🛠️ JSON·Regex

About this token & API cost calculator

Estimate how many tokens your text uses and what an API call will cost across providers such as OpenAI (GPT), Anthropic (Claude) and Google (Gemini). It runs in your browser, so your prompt text stays private.

How to use

  1. Paste your prompt or sample text.
  2. See the estimated token count.
  3. Pick a model to see the input and output cost.

Why use it

API pricing is per token and costs add up fast at scale. Estimating tokens and comparing model prices before you build helps you choose the most cost-effective model and budget accurately.

FAQ

How accurate is the token count?

It's a close estimate; exact counts vary slightly by each model's tokenizer.

Does it cover input and output pricing?

Yes — most models price input and output tokens differently, and the calculator reflects that.

Is my text sent to any API?

No — counting is done locally and nothing is uploaded.

☕ 請我喝咖啡 Ko-fi