LLM API Cost Calculator
Paste a prompt and an expected output length to estimate the API cost across Claude, GPT, and Gemini models side by side. Prices are refreshed from a public model-pricing catalog every time the site is rebuilt.
Everything runs locally in your browser — your text is never sent to any server, only the price list is fetched ahead of time at build.
Loading tokenizer dictionary…
Applied to every model equally — there is no generated text to tokenize per model, so this is a single estimate you control.
Cost by model
| Model | Input tokens | Output tokens | $ / 1M in · out | Est. cost |
|---|---|---|---|---|
| Claude Opus 4.8 | 0 | 0 | $5 · $25 | $0.00 |
| Claude Sonnet 4.5 | 0 | 0 | $3 · $15 | $0.00 |
| Claude Haiku 4.5 | 0 | 0 | $1 · $5 | $0.00 |
| GPT-5.5 | 0 | 0 | $5 · $30 | $0.00 |
| GPT-5 | 0 | 0 | $1.25 · $10 | $0.00 |
| GPT-4.1 | 0 | 0 | $2 · $8 | $0.00 |
| GPT-4o | 0 | 0 | $2.5 · $10 | $0.00 |
| GPT-4 Turbo | 0 | 0 | $10 · $30 | $0.00 |
| GPT-3.5 Turbo | 0 | 0 | $0.5 · $1.5 | $0.00 |
| Gemini 3 Pro | 0 | 0 | $2 · $12 | $0.00 |
| Gemini 2.5 Flash | 0 | 0 | $0.3 · $2.5 | $0.00 |
Pricing data fetched: 2026-08-03 · Source: OpenRouter public model catalog (reference pricing, not official vendor pricing).
Costs are estimates for rough comparison only — not for billing. Claude and Gemini token counts are heuristic estimates (±10–20%), and per-model chat-API overhead (message structure, system prompt, tool definitions) is not included. Always check the vendor's own pricing page before making a purchasing decision.
The tokenizer dictionary could not be loaded, so the GPT-based input token count is also an approximation.
Articles for this tool
Recent Articles
How CREATE TABLE Generation From a Visual Table Design Works | DDL Builder
A look inside DDL Builder, which turns a visually designed table into CREATE TABLE statements and an ER diagram. Covers the MySQL/PostgreSQL/SQLite type-mapping rules and the column-inference algorithm used for JSON samples.
GitHub Actions needs Design Patterns: Speed Up CI, Avoid the Anti-Patterns
A pattern reference for GitHub Actions job dependencies (needs). Covers diamond-shaped fan-out, concurrency cancellation, fail-fast tradeoffs, matrix-plus-needs gotchas, and reusable workflows, with copy-paste YAML examples.
SQL JOIN Types: Complete Reference to INNER, LEFT, RIGHT & FULL
A reference for SQL JOIN types (INNER/LEFT/RIGHT/FULL/CROSS/SELF) with a cheat sheet and row-count walkthroughs. Covers why one-to-many joins duplicate rows, the WHERE-vs-ON NULL trap, and how to write multi-table joins.
Case Converter: camelCase, snake_case & kebab-case — 9 Styles at Once
Convert identifiers between camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case and more — all nine styles side by side. Handles acronym runs like HTTPServer, digits, and bulk multi-line conversion.
LLM API Cost Calculator: Compare Claude, GPT & Gemini Pricing Side by Side
Paste a prompt, set the expected output tokens, and compare per-request API costs across Claude, GPT and Gemini models. Covers input/output pricing structure, auto-updated price tables, and estimate limits.
AGENTS.md, CLAUDE.md, Cursor Rules: One Source of Truth for AI Coding Agents
Every AI coding agent wants its own rules file. Compare AGENTS.md, CLAUDE.md, .cursor/rules, copilot-instructions.md and more — what to write, a copy-paste template, and how to stop them drifting apart.