OpenAI API Pricing Calculator
Convert token counts into real dollar costs for OpenAI models: GPT-4o, GPT-4o mini, o1, embeddings. Input/output split, monthly volume projection. Free, in-browser.
API pricing looks simple until you multiply it out: per-million-token rates, different input and output prices, cached-input discounts, and embeddings billed separately. This calculator takes a sample of your prompt and response text and turns it into a concrete dollar figure per request, per thousand requests, or per month.
It also compares equivalent workloads across models — often GPT-4o mini or a smaller model handles a task at 5–10% of flagship cost, and seeing the actual difference in dollars makes the choice obvious.
100% in-browser · no upload · no signup · nothing you paste or drop here leaves your device
LLM Token & Cost Calculator
Estimate token counts and API costs for OpenAI, Anthropic, Google, Meta & DeepSeek models.
LLM API prices are per 1M tokens as of June 2026 and may change without notice. Token estimates use model-specific chars-per-token ratios and may vary ±10-20% from actual counts.
How tokenizers chop text and price API calls — illustrated
LLMs don't read characters — they read tokens. A tokenizer (BPE or SentencePiece, e.g. GPT's cl100k_base/o200k_base, Claude's tokenizer, Gemini's SentencePiece) splits text into subword units, and English averages roughly 4 characters per token (CJK and dense code can differ). This tool estimates input tokens as ceil(chars ÷ charsPerToken) for each model, then computes cost as tokens ÷ 1,000,000 × per-1M price for input and output and sums them. It also shows what fraction of the model's context window the call would consume.
A token is often a whole common word, or a subword chunk of a longer word. Because each model ships its own tokenizer and its own per-1M prices, the same prompt yields slightly different token counts and costs across providers.
Ken, an app developer, is about to call an LLM endpoint with a 1,024-character prompt and wants to know which model is cheapest before the invoice lands.
- Paste the prompt:1,024 chars ÷ ~4 chars/token ≈ 256 input tokens (English text)
- Set output budget:500 output tokens via the slider — the completion allowance
- Compare models:Rows sort by total cost; input and output priced separately per model
- Watch context %:(input + output) ÷ context window × 100 — flagged red past 80%
About this OpenAI API pricing calculator
This page covers openai api cost estimator, gpt token pricing calculator, azure openai pricing calculator, llm api cost calculator — all the same underlying task as OpenAI API pricing calculator. The tool above is FreeToolHub's token calculator embedded in full: every feature works right here, and nothing you process is uploaded to any server.
Related pages
- ChatGPT Cost Calculator — ChatGPT cost calculator
- LLM Cost Comparison — 12+ Models Side by Side — LLM cost comparison
Frequently asked questions
Which OpenAI models does the calculator cover?
Current-generation chat models (GPT-4o, GPT-4o mini, o1-family), plus common embedding models. The same calculator also covers Claude, Gemini, Llama, and Mistral pricing, so you can compare across providers in one place.
How do I estimate tokens without pasting text?
As a rule of thumb, one token is about four English characters or three-quarters of a word. Paste a real sample for exact counts — system prompts, tool definitions, and conversation history all count as input tokens on every request, which is the most common source of bill shock.