CalcHub

LLM API Cost Calculator — Compare AI API Prices Instantly [2026]

Enter your token usage, get per-request and monthly costs for GPT-4o, Claude, Gemini & Llama side by side. Free browser-based tool, no signup required.

Cost Comparison

ModelProviderInput $/1MOutput $/1MPer RequestMonthly Est.
GPT-4oOpenAI$2.50$10.00$0.007500$22.50
GPT-4o-miniOpenAI$0.15$0.60$0.000450$1.35
GPT-4.1OpenAI$2.00$8.00$0.006000$18.00
GPT-4.1-miniOpenAI$0.40$1.60$0.001200$3.60
Claude Sonnet 4Anthropic$3.00$15.00$0.0105$31.50
Claude Haiku 3.5Anthropic$0.80$4.00$0.002800$8.40
Claude Opus 4Anthropic$15.00$75.00$0.0525$157.50
Gemini 2.0 FlashGoogle$0.10$0.40$0.000300$0.90
Gemini 1.5 ProGoogle$1.25$5.00$0.003750$11.25
Llama 3.3 70B (Groq)Meta/Groq$0.59$0.79$0.000985$2.96

What is LLM API Cost Calculator?

The LLM API Cost Calculator is a free tool that helps developers and businesses estimate and compare the costs of using different large language model APIs. It covers major providers including OpenAI (GPT-4o, GPT-4o-mini), Anthropic (Claude Sonnet, Haiku, Opus), Google (Gemini 1.5 Pro, Flash), and Meta (Llama 3.1 via Groq). All calculations happen in your browser with no data sent to any server.

How to Use LLM API Cost Calculator

Enter the number of input tokens and output tokens you expect to use per request. The calculator instantly shows the cost per request and monthly cost (based on requests per day) for each LLM model side by side. Use the preset buttons to quickly estimate costs for common workloads like processing a single page of text, a full document, or an entire book.

How LLM API Cost Calculator Works

The calculator multiplies your input and output token counts by each model's per-token pricing. Prices are based on the latest published API rates from each provider. Input tokens (your prompt) and output tokens (the model's response) are priced separately because most providers charge different rates for each. The tool also estimates monthly costs by multiplying the per-request cost by your expected daily request volume.

Common Use Cases

  • Comparing API costs before choosing an LLM provider for your project
  • Estimating monthly AI API spending for budget planning
  • Finding the most cost-effective model for high-volume text processing
  • Calculating per-request costs for pricing your AI-powered SaaS product
  • Evaluating whether to use a cheaper model for simple tasks vs. a premium model for complex ones

Frequently Asked Questions

How accurate are the LLM API prices shown?

The prices reflect the latest published rates as of early 2025. API pricing can change, so always verify with the official provider documentation for the most current rates.

What is a token in LLM pricing?

A token is roughly 4 characters or about 0.75 words in English. One page of text is approximately 500 tokens. LLM providers charge based on the number of tokens processed.

Why are input and output tokens priced differently?

Most LLM providers charge more for output tokens than input tokens because generating new text requires more computational resources than processing existing text.

Does this calculator include free tier credits?

No, this calculator shows the standard pay-as-you-go pricing. Many providers offer free credits for new users, which would reduce your actual costs.

Which LLM model is the cheapest?

For most use cases, GPT-4o-mini and Gemini 1.5 Flash offer the lowest per-token costs. However, the best value depends on your quality requirements — cheaper models may need more tokens to achieve the same result.

Related Tools