AI Token & Inference Cost Calculator

Estimate the API cost of a prompt across the common AI models.

FreeNo sign-upRuns in your browser

Workload Parameters

Presets:
tokens
tokens
req/day

Paste Custom Text (Token Counter)

Words: 0Chars: 0Est. Tokens: 0

Cost Optimization Insight

At your current workload of 30,000 monthly requests, choosing Gemma 3 4B instead of OpenAI o3-pro saves you approximately:

$2,816.28 / month

Model costs

  • Gemma 3 4BGoogleMost Cost Effective

    Ultra-low cost high-speed open-source lightweight model for simple agent sub-tasks.

    $3.72 / mo$0.000124 / request
    Input: $0.04/1MOutput: $0.08/1MContext: 128K
  • Nova MicroAmazon AWS

    Amazon Bedrock's lowest-cost ultra-fast lightweight text model for simple utility tasks.

    $4.94 / mo$0.000165 / request
    Input: $0.035/1MOutput: $0.14/1MContext: 128K
  • Llama 4 ScoutMeta

    Meta's premier massive 10M long-context open weights model for complex repository analysis.

    $5.85 / mo$0.000195 / request
    Input: $0.05/1MOutput: $0.15/1MContext: 10M
  • Ministral 3 3BMistral

    Sub-second inference model for ultra-low latency enterprise functions.

    $6.90 / mo$0.000230 / request
    Input: $0.1/1MOutput: $0.1/1MContext: 128K
  • Gemma 3 27BGoogle

    Google's premium SOTA Gemma 3 open-source architecture with remarkable cost efficiency.

    $7.44 / mo$0.000248 / request
    Input: $0.08/1MOutput: $0.16/1MContext: 128K
  • Nova 2 LiteAmazon AWS

    Amazon Bedrock multimodal low-latency model for rapid commercial automation.

    $8.46 / mo$0.000282 / request
    Input: $0.06/1MOutput: $0.24/1MContext: 300k
  • Gemini 3.1 Flash-LiteGoogle

    Lightweight, optimized budget version offering native multimodal cost savings.

    $8.66 / mo$0.000289 / request
    Input: $0.075/1MOutput: $0.22/1MContext: 1.0M
  • Ministral 3 8BMistral

    Highly cost-optimized small parameter open weights model.

    $10.35 / mo$0.000345 / request
    Input: $0.15/1MOutput: $0.15/1MContext: 128K
  • Gemini 3.5 Flash-LiteGoogle

    Google budget-tier Flash model for ultra-high throughput automation pipelines.

    $11.70 / mo$0.000390 / request
    Input: $0.1/1MOutput: $0.3/1MContext: 1.0M
  • Llama 4 MaverickMeta

    Next-gen dense open weights model delivering rapid inference for enterprise tasks.

    $11.70 / mo$0.000390 / request
    Input: $0.1/1MOutput: $0.3/1MContext: 1M
  • GLM-5.3-FlashZ.ai

    High-throughput optimized GLM model for large-scale automation pipelines.

    $11.70 / mo$0.000390 / request
    Input: $0.1/1MOutput: $0.3/1MContext: 1M
  • GLM-5.3 Flash (Together)Together AI

    High-throughput optimized GLM model for large-scale automation on Together.

    $11.70 / mo$0.000390 / request
    Input: $0.1/1MOutput: $0.3/1MContext: 1M
  • Ministral 3 14BMistral

    Edge-device friendly model delivering great baseline task performance.

    $13.80 / mo$0.000460 / request
    Input: $0.2/1MOutput: $0.2/1MContext: 128K
  • GPT-6 LunaOpenAI

    Efficient GPT-6 model designed for high-volume workloads where low cost and strong performance matter.

    $16.50 / mo$0.000550 / request
    Input: $0.1/1MOutput: $0.5/1MContext: 1.05M
  • Gemma 4 (Together)Together AI

    Google's next-gen Gemma open weight model optimized for sub-second responses on Together.

    $17.55 / mo$0.000585 / request
    Input: $0.15/1MOutput: $0.45/1MContext: 128K
  • Qwen3.8-FlashAlibaba

    Extremely cost-efficient Chinese/English Flash model with low inference pricing.

    $18.03 / mo$0.000601 / request
    Input: $0.15/1MOutput: $0.47/1MContext: 1M
  • Mistral Small 4Mistral

    Lightweight, optimized developer model with great reasoning benchmarks.

    $21.15 / mo$0.000705 / request
    Input: $0.15/1MOutput: $0.6/1MContext: 256K
  • DeepSeek-V4.1-FlashDeepSeek

    High-speed serverless developer model offering low latency logic.

    $31.50 / mo$0.001050 / request
    Input: $0.22/1MOutput: $0.9/1MContext: 1M
  • DeepSeek V4.1 Flash (Together)Together AI

    High-speed serverless developer model offering low latency logic hosted on Together.

    $31.50 / mo$0.001050 / request
    Input: $0.22/1MOutput: $0.9/1MContext: 1M
  • Gemini 3.5 FlashGoogle

    Multimodal efficiency model with high concurrency and strong baseline reasoning.

    $40.95 / mo$0.001365 / request
    Input: $0.35/1MOutput: $1.05/1MContext: 1.0M
  • MiniMax M3 (Together)Together AI

    MiniMax premium multi-mode reasoning model hosted on Together's high-throughput cloud.

    $42.30 / mo$0.001410 / request
    Input: $0.3/1MOutput: $1.2/1MContext: 1M
  • NVIDIA Nemotron (Together)Together AI

    NVIDIA's customized advanced reasoning and utility model hosted serverless on Together AI.

    $49.35 / mo$0.001645 / request
    Input: $0.35/1MOutput: $1.4/1MContext: 128K
  • Mistral Large 3Mistral

    European flagship model delivering outstanding multilingual logic and coding strength.

    $58.50 / mo$0.001950 / request
    Input: $0.5/1MOutput: $1.5/1MContext: 256K
  • Qwen3.5-PlusAlibaba

    Baseline high-performance open model matching western flagships on key metrics.

    $75.60 / mo$0.002520 / request
    Input: $0.4/1MOutput: $2.4/1MContext: 1M
  • Grok Build 0.1xAI

    Lowest-priced text model optimized for software engineering and rapid application building.

    $93.00 / mo$0.003100 / request
    Input: $1/1MOutput: $2/1MContext: 256K
  • MiniMax M3MiniMax

    MiniMax premium multi-mode reasoning model with dynamic context capabilities.

    $93.60 / mo$0.003120 / request
    Input: $0.8/1MOutput: $2.4/1MContext: 1M
  • Qwen3.6-PlusAlibaba

    Stable multilingual model optimized for low-resource translation and coding.

    $94.50 / mo$0.003150 / request
    Input: $0.5/1MOutput: $3/1MContext: 1M
  • Qwen 3.7-Plus (Together)Together AI

    Stable multilingual model optimized for low-resource translation hosted on Together.

    $94.50 / mo$0.003150 / request
    Input: $0.5/1MOutput: $3/1MContext: 1M
  • DeepSeek-V4-ProDeepSeek

    SOTA open reasoning model with ultra-low cost peak/off-peak billing cycles.

    $115.83 / mo$0.003861 / request
    Input: $0.99/1MOutput: $2.97/1MContext: 1M
  • DeepSeek V4 Pro (Together)Together AI

    SOTA open reasoning model with ultra-low cost peak/off-peak rates on Together.

    $115.83 / mo$0.003861 / request
    Input: $0.99/1MOutput: $2.97/1MContext: 1M
  • Grok 4.3xAI

    High-speed active developer model with an expanded 1M context window.

    $116.25 / mo$0.003875 / request
    Input: $1.25/1MOutput: $2.5/1MContext: 1M
  • Grok 4.20 ReasoningxAI

    Specialized deep-reasoning and multi-agent model with a massive 2M token limit.

    $116.25 / mo$0.003875 / request
    Input: $1.25/1MOutput: $2.5/1MContext: 2M
  • GLM-5.3Z.ai

    Z.ai premier flagship GLM family model with advanced agent and logic skills.

    $117.00 / mo$0.003900 / request
    Input: $1/1MOutput: $3/1MContext: 1M
  • GLM-5.3 (Together)Together AI

    Z.ai premier flagship GLM family model with advanced agent skills on Together.

    $117.00 / mo$0.003900 / request
    Input: $1/1MOutput: $3/1MContext: 1M
  • Gemini 3.8 FlashGoogle

    Google's premier high-throughput, low-latency flagship model recommended for production workloads.

    $123.75 / mo$0.004125 / request
    Input: $0.75/1MOutput: $3.75/1MContext: 1.0M
  • Gemini 3.7 FlashGoogle

    Advanced multimodal high-speed Flash model supporting reasoning and multi-step logic.

    $123.75 / mo$0.004125 / request
    Input: $0.75/1MOutput: $3.75/1MContext: 1.0M
  • Gemini 3.6 FlashGoogle

    Stable general-purpose Gemini model with balanced reasoning and low response times.

    $123.75 / mo$0.004125 / request
    Input: $0.75/1MOutput: $3.75/1MContext: 1.0M
  • Kimi K3Moonshot AI

    Moonshot AI's flagship long-context model engineered for huge document parsing.

    $140.40 / mo$0.004680 / request
    Input: $1.2/1MOutput: $3.6/1MContext: 1M
  • Nova PremierAmazon AWS

    AWS flagship Bedrock model for heavy generative logic.

    $141.00 / mo$0.004700 / request
    Input: $1/1MOutput: $4/1MContext: 300k
  • OpenAI o4-miniOpenAI

    Fast, cost-efficient reasoning model tailored for high-volume STEM processing.

    $155.10 / mo$0.005170 / request
    Input: $1.1/1MOutput: $4.4/1MContext: 200k
  • Muse Spark 1.3Meta

    Meta's flagship first-party standard text and multimodal API offering with native search groundings.

    $158.25 / mo$0.005275 / request
    Input: $1.25/1MOutput: $4.25/1MContext: 128K
  • Claude Haiku 4.5Anthropic

    High-speed Haiku iteration providing immediate developer-level response speeds at low cost.

    $165.00 / mo$0.005500 / request
    Input: $1/1MOutput: $5/1MContext: 200k
  • Grok 4.7xAI

    xAI's flagship model with real-time web integration and advanced reasoning capability.

    $234.00 / mo$0.007800 / request
    Input: $2/1MOutput: $6/1MContext: 500K
  • Qwen3.8-MaxAlibaba

    Alibaba's premier high-capability flagship model for enterprise multi-agent workflows.

    $234.00 / mo$0.007800 / request
    Input: $2/1MOutput: $6/1MContext: 1M
  • Qwen 3.8 (Together)Together AI

    Alibaba's premier flagship Qwen model hosted serverless on Together AI.

    $234.00 / mo$0.007800 / request
    Input: $2/1MOutput: $6/1MContext: 1M
  • Mistral Medium 3.5Mistral

    Premium European API model balancing speed, safety compliance, and intelligence.

    $247.50 / mo$0.008250 / request
    Input: $1.5/1MOutput: $7.5/1MContext: 256K
  • OpenAI o3OpenAI

    Advanced reasoning model balancing deep STEM and coding logic with fast output.

    $282.00 / mo$0.009400 / request
    Input: $2/1MOutput: $8/1MContext: 200k
  • Sonar Reasoning ProPerplexity

    Multi-step logic reasoning search API with citation references.

    $282.00 / mo$0.009400 / request
    Input: $2/1MOutput: $8/1MContext: 128K
  • GPT-6.1 SolOpenAI

    Near-frontier model balancing advanced reasoning, coding capability, speed, and cost.

    $330.00 / mo$0.011000 / request
    Input: $2/1MOutput: $10/1MContext: 1.05M
  • Claude Sonnet 5.5Anthropic

    The industry standard for agentic coding, workflow automation, and fast-paced reasoning.

    $330.00 / mo$0.011000 / request
    Input: $2/1MOutput: $10/1MContext: 1M
  • Command ACohere

    Cohere's premier model optimized for search-grounded RAG pipelines and tool use.

    $352.50 / mo$0.011750 / request
    Input: $2.5/1MOutput: $10/1MContext: 256K
  • Jamba 1.5 LargeAI21 Labs

    AI21's premier hybrid SSM-Transformer architecture model for high throughput tasks.

    $386.10 / mo$0.012870 / request
    Input: $3.3/1MOutput: $9.9/1MContext: 256k
  • Sonar ProPerplexity

    Perplexity flagship search API leveraging real-time search queries and web groundings.

    $495.00 / mo$0.016500 / request
    Input: $3/1MOutput: $15/1MContext: 128K
  • Kimi K3 (Together)Together AI

    Moonshot AI's flagship long-context model optimized for speed and caching on Together.

    $495.00 / mo$0.016500 / request
    Input: $3/1MOutput: $15/1MContext: 1M
  • Claude Opus 5.5Anthropic

    SOTA research-grade model delivering sophisticated text analysis, math, and code synthesis.

    $660.00 / mo$0.022000 / request
    Input: $4/1MOutput: $20/1MContext: 1M
  • GPT-6 AstraOpenAI

    OpenAI's most capable flagship model for complex reasoning, coding, research, computer use, and demanding professional workflows.

    $1650.00 / mo$0.055000 / request
    Input: $10/1MOutput: $50/1MContext: 1.05M
  • Claude Fable 5.1Anthropic

    Anthropic's ultimate flagship model with deep philosophical reasoning and premier intelligence.

    $1650.00 / mo$0.055000 / request
    Input: $10/1MOutput: $50/1MContext: 1M
  • OpenAI o3-proOpenAI

    Ultra-capable math, coding, and logical reasoning model with priority compute limits.

    $2820.00 / mo$0.094000 / request
    Input: $20/1MOutput: $80/1MContext: 200k

How to use it

  1. Set your workload

    Pick a preset or set input tokens, output tokens and daily requests. You can also paste text to count its tokens.

  2. Compare the models

    Search, filter by provider and sort. Every model shows its monthly and per-request cost.

  3. Export the numbers

    Copy a Markdown report or download a CSV to share with your team.

Calculate accurate API costs across OpenAI, Anthropic, Google Cloud, DeepSeek, and Grok. Benchmarks per-million input/output token pricing, context window ceilings, and prompt caching discounts.

What You Can Do With This AI Token Calculator

This AI token calculator helps you measure and compare token costs, token usage, and API costs across different models such as OpenAI, Anthropic Claude, and Google Gemini. Use it to understand the maximum input and maximum output allowed by each model so you can manage token usage and costs more efficiently.

Prompt Tokens and API Cost

Estimate API token costs for input tokens, output tokens, and cached tokens. Use this AI token calculator to identify which model fits your budget and performance needs. Paste a prompt once and see what it costs across every provider.

Token Counts, Words and Characters

Each token calculator result includes characters, word count, input token, and output token estimates. You can view total token costs per model, monitor API costs, and plan your text processing within the token limit. No Excel sheet needed. A longer prompt costs more, so trim what you don't need before you send it.

How the Tokenizer Counts Your Prompt

The calculator estimates tokens right in your browser at about 4 characters per token, the usual rule for English text, so treat the count as a close estimate rather than the exact billed number. A tokenizer splits text into pieces that don't always line up with whole words: common terms stay intact, while rare ones, numbers and code break apart. That is why the same prompt gives a different count on GPT and Claude, and on open models like Llama.

Frequently Asked Questions About AI Token Costs

How much do AI tokens cost in 2026?

AI token prices in 2026 vary widely by provider and model, from budget models at well under $1 per million output tokens to flagship reasoning models at tens of dollars per million output tokens. Most general-purpose APIs (GPT-6 Astra, Claude Sonnet 5.5, Gemini 3.8 Flash, DeepSeek-V4-Pro) are priced per million input and output tokens — use the calculator above to compare their current rates side by side. Input tokens are typically cheaper than output tokens, and prompt caching drops costs further on supported providers.

What is the cheapest AI API in 2026?

The cheapest mainstream AI APIs change as providers update their pricing, so check the calculator above for the current rates. Current examples in the calculator include GPT-6 Astra, Claude Sonnet 5.5, Gemini 3.8 Flash, and DeepSeek-V4-Pro. Use the calculator's "Lowest Cost First" filter to compare real-time rates across all active models in one click.

How do I calculate AI API costs?

Multiply your input tokens by the applicable per-million input rate, multiply your output tokens by the applicable output rate, and divide both by 1,000,000. Add them together and multiply by your projected daily or monthly request volume. Our interactive calculator automates this calculation in real time and handles published long-context and caching discounts automatically.

Do long prompts and large context windows cost more per token?

Every longer prompt costs more in total because it contains more billable input tokens. Some providers also apply tiered rates when crossing context boundaries (for instance, long-context requests over 200k tokens may move to higher rate tiers on select Google Pro or xAI models). Conversely, models like Claude Sonnet 5.5 maintain standard flat per-token rates across their entire context window.

How many tokens are in 1,000 words?

In standard English prose, 1,000 words translates to roughly 1,330 to 1,400 tokens (the standard rule of thumb is 1 token ≈ 0.75 words, or about 4 characters). Code, JSON, and non-Latin scripts (such as Japanese, Arabic, or Chinese) tokenize differently: code is denser (1 token ≈ 3.5 chars), and foreign scripts can cost 2–3x more tokens per character.

Are input tokens and output tokens priced the same?

No. Output tokens are almost always 3x to 8x more expensive than input tokens. Output generation requires sequential autoregressive token prediction, whereas input prompts are processed in parallel matrix computations. Capping your max output tokens or writing concise system instructions is the single most effective way to control API costs.

What is prompt caching and how does it lower costs?

Prompt caching is a discount applied to prompt tokens that the provider has already processed in a recent prior request, such as system instructions, agent conversation history, or RAG documentation context. OpenAI, Anthropic, and DeepSeek offer cached input rates at a 75% to 90% discount, allowing agent loops and long documents to run at a fraction of standard cost.

How accurate is this AI token cost calculator?

All model prices in this calculator come directly from the official API pricing documentation of each provider (OpenAI, Anthropic, Google Cloud, DeepSeek, xAI, Meta, Mistral, Cohere, Perplexity, Alibaba). We monitor official pricing sheets to ensure you are comparing current, up-to-date rates.

Why is DeepSeek or Gemini Flash so much cheaper than legacy flagship models?

Modern efficiency-focused models like DeepSeek-V4-Pro and Gemini 3.8 Flash utilize Mixture-of-Experts (MoE) architectures, hardware-optimized inference clusters, and high-throughput server pipelines. They deliver 90%+ of flagship quality at less than 10% of the cost.

Which is the most expensive model to date?

The most expensive specialized model is OpenAI’s o1-pro, at $150 per 1M input tokens and $600 per 1M output tokens. Among general flagship models, Claude 3 Opus ($15.00 input / $75.00 output) and OpenAI o1 ($15.00 input / $60.00 output) sit at the top tier.

Explore the AI Prompt Library

Browse prompt formulas for FLUX.1, Midjourney, and Claude with live variable customization.

Browse Prompt Library

More free tools

All free tools
JSON Formatter and Validator

Paste JSON to format, check or minify it. Shows the line and column of any error.

Runs in your browser
System Prompt Optimizer

Refine, structure, and optimize LLM system instructions for superior model adherence and precision.

Runs in your browser
AI Tool Finder & Recommendation Quiz

Find the ideal AI tool for your exact workflow and project needs with our interactive recommendation quiz.

Runs in your browser
Word & Character Counter

Analyze text with real-time word, character, sentence, paragraph, and reading time statistics.

Runs in your browser