Resources / Free tools

AI cost calculator

Estimate a month of AI API costs at published rates using your tool and model, your sessions per day, and your input and output tokens per session. It runs in your browser and is free to use with no signup.

Monthly API estimate
$3.80Details

Tool and model

View estimate ↓
Not rated

Intelligence scores: Artificial Analysis Intelligence Index v5.0.1, checked

Billing method

Your usage

Count every call in one session, including repeated context and billed reasoning.

Prompt caching

Estimate10 turns · 55% reads, 18% writes · 5m
Assumption used to estimate repeated input.
Default
Default
Default

How the defaults are estimated

Estimate · Reads = units in prefixes meeting the minimum / total units = 30/55 = 54.5% · New = 2/(T+1) = 18.2% · Billed writes = 18.2% (T = 10 turns) · Requests under 1,024 tokens don't cache (minimum for this model)

OpenClaw seeds short (5m) retention on Anthropic. OpenAI and other providers use their defaults. Gemini defaults to implicit caching. On supported models, short or long creates an explicit cachedContents resource when the prefix meets the cache minimum. Minimum cacheable prompt is 1,024 tokens.

Monthly API estimate

Not rated

$3.80

Claude Sonnet 4.6

Prices checked

How it adds up

4 sessions/day × 30 days = 120 sessions

Regular input
327,273 tokens × $3 ÷ 1M ≈ $0.98
Cache reads
654,545 tokens × $0.3 ÷ 1M ≈ $0.20
Cache writes (5m)
218,182 tokens × $3.75 ÷ 1M ≈ $0.82
Output
120,000 tokens × $15 ÷ 1M ≈ $1.80

Text usage at published rates. Taxes, credits, hosting and tool calls are excluded.See all rates in one table.

Optimized picks

Estimate

Compare rated models at their top effort, using your workload and each model’s cache defaults.

How the cost is calculated

Input tokens are what the model reads on each call, including instructions, your message and any history you send again. Output tokens are what it generates, including any billed reasoning tokens. For a typical session, add up input and output tokens separately across calls. Multiply each total by your sessions per day and by 30 days.

When the provider reuses part of a prompt from its cache, those input tokens use the cache-read rate. If the provider charges for writing tokens into its cache, those tokens use the cache-write rate. The remaining input uses the regular rate. For each category, including output, divide its monthly token count by one million and multiply by the model’s price per million tokens. Add the charges, plus any applicable cache storage or routing fee.

Worked example with Claude Sonnet 4.6

The opening OpenClaw example uses 10,000 input tokens and 1,000 output tokens per session. At 4 sessions a day for 30 days, that comes to 120 sessions with 1,200,000 input tokens and 120,000 output tokens. Applying the default cache settings gives these monthly charges.

  • Regular input · 327,273 tokens × $3 ÷ 1M ≈ $0.98
  • Cache reads · 654,545 tokens × $0.3 ÷ 1M ≈ $0.20
  • Cache writes (5m) · 218,182 tokens × $3.75 ÷ 1M ≈ $0.82
  • Output · 120,000 tokens × $15 ÷ 1M ≈ $1.80

Together these charges come to $3.80 per month. You can see the same arithmetic for your own settings under How it adds up.

How it works

  • Choose your tool and model. For a token estimate, select API key where a billing choice is available.
  • Enter the input and output tokens across all calls in a typical session, including repeated context and billed reasoning.
  • Set sessions per day to your expected frequency. Read “How it adds up” to see which charges account for most of the estimate.

How the calculator estimates AI cost (FAQ)

  • How do I calculate monthly AI API cost from tokens?

    At 4 sessions per day for 30 days, the estimate covers 120 sessions. Multiply each per-session token count by the number of monthly sessions, divide by one million, and multiply by the model’s rate per million for that category. Add the charges, including any applicable cache storage or OpenRouter fee.

  • How does prompt caching change the estimate?

    Cache reads and billed cache writes each use their own share of input tokens at the model’s published rate. The remaining input uses the regular rate. If you know your cache shares, enter them under Prompt caching to replace the defaults.

  • How do subscription fees compare with API charges?

    For supported tools and models, choose Subscription to see the plan’s price and any published limits. The API-equivalent estimate appears separately so you can see what the same workload would cost at API rates.

  • How to calculate AI cost savings when switching models?

    Keep the workload the same and subtract the cheaper model’s monthly API estimate from your current model’s estimate. If your current estimate is above zero, divide the savings by that estimate and multiply by 100 to get the percentage saved. Optimized picks compares models using each model’s default cache settings.

  • Why might my API bill differ from the estimate?

    The estimate assumes a typical session repeats throughout a 30-day month. Longer replies, more sessions or fewer cache hits can raise the bill. Your invoice may also include tool calls, taxes or credits that the calculator leaves out.

Compare models

One task uses 10,000 input tokens and 1,000 output tokens at the standard short-context list price, with no caching.

Sources checked . Prices in USD for .

ModelGood atWeak atUse it forSkip it forCost per task
Anthropic Claude Sonnet 4.6
  • writes code, reasons over long inputs and plans agent tasks Anthropic
  • fits codebases and lengthy contracts in a single request Anthropic
  • plan changes across a large codebase
  • new deployments requiring a current-generation model
$0.045
Anthropic Claude Haiku 4.5
  • handles low-latency chat and pair programming Anthropic
  • requires manual control of extended thinking Anthropic
  • suggest edits while a developer types
  • agents that must choose when to think
$0.015
Anthropic Claude Fable 5.2
  • reasons through long-running agent tasks Anthropic
  • conducts research in several steps Anthropic
  • requires authorization for zero data retention Anthropic
  • run an extended research investigation
  • zero-retention workloads without an explicit exception
$0.12
Anthropic Claude Opus 5.5
  • runs coding agents through large refactors Anthropic
  • handles workflows that rely on vision Anthropic
  • keeps adaptive thinking enabled on every request Anthropic
  • delegate a refactor that takes hours
  • work through a visual interface
  • requests that must disable thinking
$0.06
Anthropic Claude Opus 5
  • handles code changes and knowledge work Anthropic
  • solves unfamiliar reasoning problems Anthropic
  • work through an unfamiliar programming problem
  • new deployments requiring a current-generation model
$0.075
Anthropic Claude Sonnet 5.5
  • writes code and analyzes data Anthropic
  • interprets visuals and calls tools as an agent Anthropic
  • rejects custom temperature settings Anthropic
  • build an agent that interprets visual input
  • workflows that tune sampling temperature
$0.03
Anthropic Claude Sonnet 5
  • plans tasks and uses browsers and terminals Anthropic
  • writes code and reasons through tasks Anthropic
  • delegate a coding task that needs a terminal
  • workflows that set their own sampling temperature
$0.03
Anthropic Claude Haiku 5.5
  • handles classification and routing with low latency Anthropic
  • keeps small-model workloads inexpensive Anthropic
  • serves as a coding subagent Anthropic
  • uses more tokens than Haiku 4.5 for identical text Anthropic
  • route incoming support requests in bulk
  • delegate small coding tasks
  • reusing Haiku token estimates without recalculating
$0.0015
OpenAI GPT-5.4 mini
  • writes code and runs delegated tasks OpenAI
  • handles high-volume tasks quickly OpenAI
  • reads dense interface screenshots OpenAI
  • caps total context at 400,000 tokens OpenAI
  • delegate code edits to a subagent
  • read a screenshot from an application
  • prompts that exceed its context window
$0.012
OpenAI GPT-5.4 nano
  • classifies, extracts and ranks data quickly OpenAI
  • handles simple workloads at the lowest family cost OpenAI
  • handles simpler coding subtasks OpenAI
  • has an August 2025 knowledge cutoff OpenAI
  • classify a backlog of records
  • delegate a small coding task
  • answering recent questions from built-in knowledge alone
$0.0033
OpenAI gpt-6.2-astra
  • reasons through complex programming problems OpenAI
  • creates slides, spreadsheets and documents OpenAI
  • delegates work to subagents OpenAI
  • requires reasoning on every API request OpenAI
  • work through a difficult coding problem
  • prepare a presentation or written report
  • requests that must turn off reasoning
$0.12
OpenAI gpt-6.2-sol
  • handles everyday coding and large-scale agent work OpenAI
  • writes clear prose OpenAI
  • calls web search from the Responses API OpenAI
  • caps each response at 128,000 tokens OpenAI
  • build a coding assistant that searches the web
  • draft a plain-language explanation
  • single responses exceeding the output cap
$0.03
OpenAI gpt-6-astra
  • handles complex reasoning and coding OpenAI
  • handles research and document creation OpenAI
  • ultrafast processing has limited data residency options OpenAI
  • develop and document a solution to a research problem
  • ultrafast jobs requiring EU data residency
$0.15
OpenAI gpt-6.1-sol
  • handles complex coding and computer use OpenAI
  • delegates work to subagents in beta OpenAI
  • requires the Responses API for tool calls OpenAI
  • distribute a complex coding task across subagents
  • calling tools through Chat Completions
$0.03
OpenAI gpt-6.1-terra
  • quickly reasons about visual input OpenAI
  • drafts and revises prose OpenAI
  • interprets technical drawings OpenAI
  • requires the Responses API for tool calls OpenAI
  • interpret an engineering drawing
  • edit the wording of a proposal
  • calling tools through Chat Completions
$0.015
OpenAI gpt-6-luna
  • handles focused work at high volume OpenAI
  • minimizes cost and latency on reasoning workloads OpenAI
  • handles coding tasks OpenAI
  • Chat Completions function calls require reasoning to be off OpenAI
  • run many small coding tasks
  • reasoning with function calls through Chat Completions
$0.0015
OpenAI gpt-6-sol
  • handles complex coding and agent workflows OpenAI
  • Chat Completions function calls require reasoning to be off OpenAI
  • automate a multistep software change
  • reasoning with function calls through Chat Completions
$0.03
OpenAI gpt-5.6-sol
  • coordinates tools for command-line coding tasks OpenAI
  • handles complex professional assignments OpenAI
  • caps each response at 128,000 tokens OpenAI
  • delegate a coding task that spans several terminal commands
  • single responses exceeding the output cap
$0.08
OpenAI gpt-5.6-terra
  • handles everyday work OpenAI
  • coordinates tools by writing JavaScript OpenAI
  • works with long inputs OpenAI
  • trails its successor on visual reasoning OpenAI
  • coordinate several tools in a single workflow
  • analyze a long document
  • visual reasoning tasks where benchmark accuracy takes priority
$0.032
OpenAI gpt-5.6-luna
  • runs high-volume workloads OpenAI
  • runs quickly at its family’s lowest cost OpenAI
  • has a February 2026 knowledge cutoff OpenAI
  • handle many short requests on a budget
  • answering recent questions from built-in knowledge alone
$0.0032
OpenAI gpt-5.5
  • writes and debugs code OpenAI
  • researches online and analyzes data OpenAI
  • uses tools across multiple steps OpenAI
  • does not accept native audio OpenAI
  • research a question using several tools
  • track down an error in code
  • analyzing a recording directly
$0.08
OpenAI gpt-5.4
  • creates and edits spreadsheets, presentations and documents OpenAI
  • handles coding, reasoning and agent workflows OpenAI
  • has an August 2025 knowledge cutoff OpenAI
  • revise a presentation or spreadsheet
  • delegate a multistep coding task
  • answering recent questions from built-in knowledge alone
$0.04
xAI grok-4.7
  • delegate a coding task
  • prepare a presentation or document
  • requests that must bypass reasoning
$0.026
xAI grok-4.6
  • delegate work spanning several parts of a codebase
  • coding agents chosen for their xhigh benchmark performance
$0.026
xAI grok-4.5
  • automate a multistep engineering task
  • workflows requiring a distinct extra-high reasoning setting
$0.026
xAI grok-4.3
  • build a responsive assistant that calls tools
  • vary reasoning across a long conversation
  • workflows that sample above that temperature
$0.015
xAI grok-4.20-0309-reasoning
  • reason through a task before calling tools
  • requests requiring custom stop sequences
$0.015
xAI grok-4.20-0309-non-reasoning
  • run a tool call with strict instructions
  • scoring individual tokens by their predicted probability
$0.015
xAI grok-4.20-multi-agent-0309
  • research several sources at once
  • deployments requiring a stable multi-agent API
$0.015
Google gemini-4-carbon
  • handles difficult engineering, math and science problems Google
  • runs autonomous multistep agents Google
  • shares context between long inputs and outputs Google
  • takes longer per turn than Argon Google
  • run an agent through a difficult engineering problem
  • analyze long technical inputs
  • interactive work where each turn must finish quickly
$0.06
Google gemini-4-argon
  • handles complex coding, agent, math and science tasks Google
  • reasons with faster responses than Carbon Google
  • handles long inputs and outputs in shared context Google
  • synchronous responses stop at 65,536 tokens Google
  • iterate on complex code interactively
  • work across a long technical document
  • longer answers that must finish in one synchronous response
$0.06
Google gemini-4-neon
  • finishes complex software tasks quickly Google
  • debugs repositories and refactors across files Google
  • shares a large context between input and output Google
  • requires a paid API tier Google
  • refactor several files in an interactive session
  • projects restricted to the free API tier
$0.045
Google gemini-4-hydrogen
  • handles everyday coding and agent work quickly Google
  • batches read and search calls in parallel Google
  • accepts long inputs and outputs together Google
  • lacks explicit context caching Google
  • build an agent that searches while reading documents
  • work with long inputs in an interactive session
  • workflows that create and reuse explicit caches
$0.0225
Google gemini-3.8-flash
  • handles extended coding tasks and autonomous agents Google
  • responds quickly in chat at low thinking effort Google
  • fabricates more claims than Hydrogen in Google’s comparison Google
  • delegate an extended software engineering task
  • answers where invented details carry a high cost
$0.0113
Google gemini-3.6-flash
  • writes code and reasons about spatial relationships Google
  • handles rapid coding iterations Google
  • caps each response at 65,536 tokens Google
  • iterate on code with an agent
  • single responses exceeding the output cap
$0.0113
Google gemini-3.5-flash-lite
  • provides fast, low-cost processing at high volume Google
  • translates, summarizes and extracts structured data Google
  • handles document parsing and subagent tasks Google
  • caps each response at 65,536 tokens Google
  • translate or summarize a large batch of documents
  • delegate document parsing to a subagent
  • single responses exceeding the output cap
$0.0055
Google gemini-3.1-pro-preview
  • handles software engineering and agent workflows Google
  • uses tools precisely across multiple steps Google
  • is available as a preview release Google
  • run a coding agent through several tool calls
  • deployments requiring a generally available release
$0.032
DeepSeek deepseek-flash
  • reads screenshots and analyzes charts DeepSeek
  • handles coding, reasoning and agent tasks DeepSeek
  • searches the web and answers with citations DeepSeek
  • rejects images in assistant messages DeepSeek
  • extract text or figures from a screenshot
  • answer a question with web citations
  • replaying images inside assistant messages
$0.0042
DeepSeek deepseek-v4-pro
  • adjusts reasoning effort for agent tasks DeepSeek
  • searches the web inside the Responses API DeepSeek
  • handles agent-driven software development DeepSeek
  • adjust thinking depth during a coding task
  • look up facts during an API response
  • reading screenshots or charts directly
$0.0172
Mistral Mistral Large 4
  • handles coding, reasoning and agent workflows Mistral AI
  • reads charts, technical drawings and documents Mistral AI
  • works across European Union languages Mistral AI
  • analyze a technical drawing
  • handle requests in different European Union languages
  • applications that must turn reasoning off
$0.0091
Mistral Mistral Small 4
  • extract information from an image or document
  • build a multilingual coding assistant
  • single requests exceeding the context window
$0.0021
Perplexity perplexity/sonar
  • Agent API search filters accept up to 200 domains or URLs Perplexity
  • look up a fact before answering
  • allowlisting more sites than one search filter accepts
$0.005
Perplexity perplexity/nemotron-3.5-super-120b-a12b
  • analyze a long text document
  • sending screenshots directly to the hosted model
$0.0025
Perplexity perplexity/glm-5.3
  • handles complex software engineering and agent tasks Z.ai
  • works through long programming tasks Z.ai
  • cannot guarantee reasoning is off on Perplexity Perplexity
  • delegate a long software engineering task
  • requests that must produce zero reasoning tokens
$0.0184
Perplexity perplexity/glm-5.3-flash
  • handles coding and agent tasks Z.ai
  • retains accuracy over long contexts Z.ai
  • can still reason at the lowest Perplexity setting Perplexity
  • work through code with a long input history
  • requests that must produce zero reasoning tokens
$0.002
Perplexity perplexity/deepseek-v4-pro-0813
  • Perplexity caps each response at 131,072 tokens Perplexity
  • delegate a coding task that needs reasoning
  • generating longer answers in a single response
$0.0172
Perplexity perplexity/kimi-k3
  • sustains long coding sessions across large repositories Moonshot AI
  • reasons through long-running coding tasks Perplexity
  • Orchestrator requires resending conversation history Perplexity
  • delegate a change spanning a large repository
  • follow-ups that rely on server-stored conversation history
$0.045
Vercel v0 Mini
  • combines fast output with cost-efficient generation Vercel
  • scaffolds web apps and components Vercel
  • has less capacity for demanding work than Max Vercel
  • prototype a web component on a budget
  • builds requiring the most capable v0 tier
$0.0015
Vercel v0 Pro
  • balances speed and quality for everyday tasks Vercel
  • builds web apps with authentication and databases Vercel
  • Vercel points complex design work to Max Vercel
  • build a web app with sign-in and a database
  • demanding design work that calls for Max
$0.03
Vercel v0 Max
  • handles demanding design work Vercel
  • builds user interfaces from wireframes and mockups Vercel
  • turns prompts into working code Vercel
  • produces less reliable full-stack results outside Next.js Vercel
  • turn a complex mockup into a working interface
  • builds requiring equal reliability across frameworks
$0.06
Vercel v0 Max Fast
  • generates output quickly for rapid iteration Vercel
  • scaffolds web apps and components Vercel
  • generated apps cannot directly call v0’s connected MCP tools Vercel
  • iterate quickly on a web component
  • apps that must call v0’s MCP tools at runtime
$0.12
Meta Muse Spark 1.3 / 1.2 (Standard)
  • Standard mode excludes your content from training. Meta
  • Standard input costs more than Contributor input. Meta
  • Work with code that must stay out of model training.
  • A budget based on Contributor rates.
$0.0168 · Checked Nov 28, 2026
Meta Muse Spark 1.3 / 1.2 (Contributor)
  • Contributor mode discounts fresh and cached input. Meta
  • Meta may use prompts, code, files and responses to train future models. Meta
  • Estimate a workload you can share for training.
  • Projects with restrictions on training data.
$0.0012 · Checked Nov 28, 2026
Meta Muse Wonder (Standard)
  • The full context window uses the same token rates. Meta
  • Contributor pricing is unavailable for Wonder. Meta
  • Estimate long prompts without a context surcharge.
  • A workload that requires Contributor rates.
$0.06 · Checked Nov 28, 2026

Quick picks

Best quality = highest Artificial Analysis score among priced models tagged for the task. Best value = lowest cost per task with a score of 40 or more.

Intelligence scores: Artificial Analysis Intelligence Index v5.0.1, checked

Official price sources

OpenClaw

Nous Research

Anthropic

OpenAI

xAI

Meta

Google

GitHub

Perplexity

Mistral

Cognition

Replit

Lovable

Vercel

StackBlitz

OpenRouter

DeepSeek

Next steps

Free

Estimated savings

Run the numbers above to see your estimated savings and the kit that fits.

Platform guides and starter kits