TryLLMCost
All 20 Calculators/Provider Calculators
OpenAI Pricing Calculator

OpenAI API Cost Calculator (GPT-4.1, GPT-4o, o3 & o4-mini)

Estimate live token usage and monthly API spend across every OpenAI model — including 75% cached-input savings on GPT-4.1/o3 and 50% Batch API pricing.

Reference public API rates (2025–2026) — editable inline
32 tok
44 tok
~432 tok
50%
0–90%
Async Batch API (24h SLA)
Live Token EstimatorEnglish Prose
OpenAI (o200k)
76
Claude (~1.08x)
82
Gemini (~1.03x)
78
Input Words
52
Characters
357
Out Tokens
432
Cheapest Match (1k calls):GPT-4.1 nano · $0.18
#Model & ProviderContext / SpeedInput $/1M (edit)Output $/1M (edit)Cached $/1M1 Call1,000 Calls100,000 Callsvs GPT-4o
1
GPT-4.1 nano
OpenAI·Fast / Budget
1.0M ctx
170 tok/s
$0.025$0.0002$0.18$17.75-96%
2
GPT-4o miniFocus
OpenAI·Fast / Budget
128K ctx
135 tok/s
$0.075$0.0003$0.27$26.77-94%
3
GPT-4.1 miniFocus
OpenAI·Fast / Budget
1.0M ctx
115 tok/s
$0.10$0.0007$0.71$71.02-84%
4
OpenAI o4-miniFocus
OpenAI·Reasoning
200K ctx
95 tok/s
$0.28$0.0020$1.95$195.31-56%
5
GPT-4.1Focus
OpenAI·Frontier
1.0M ctx
78 tok/s
$0.50$0.0036$3.55$355.10-20%
6
OpenAI o3Focus
OpenAI·Reasoning
200K ctx
52 tok/s
$0.50$0.0036$3.55$355.10-20%
7
GPT-4oFocus
OpenAI·Frontier
128K ctx
85 tok/s
$1.25$0.0045$4.46$446.25Baseline

Tip: Click any Input or Output $/1M cell to test custom enterprise discounts, Bedrock/Vertex tiers, or Gemini 2.5 Pro >200k long-context rates inline.

Key Cost Benchmarks & Pricing Dynamics

GPT-4.1 vs GPT-4o Savings
20% Cheaper Base

GPT-4.1 drops uncached input from $2.50 to $2.00/1M and cached input by 60% ($0.50 vs $1.25/1M).

Automatic Prompt Caching
50%–75% Off Input

Repeated prefixes >=1,024 tokens trigger automatic caching on OpenAI with zero extra write fees.

Batch API Async Discount
Flat 50% Off

Non-urgent evals, summaries, and backfills completed within 24 hours cost half on both input and output.

Focused Models in This Calculator

GPT-4.1OpenAI
Input/1M
$2.00
Output/1M
$8.00
Cached/1M
$0.50
1.0M context~78 tok/s

Coding, 1M-context RAG, instruction following

GPT-4.1 miniOpenAI
Input/1M
$0.40
Output/1M
$1.60
Cached/1M
$0.10
1.0M context~115 tok/s

High-volume agents, classification, extraction

GPT-4oOpenAI
Input/1M
$2.50
Output/1M
$10.00
Cached/1M
$1.25
128K context~85 tok/s

Multimodal chat, vision + text assistants

GPT-4o miniOpenAI
Input/1M
$0.15
Output/1M
$0.60
Cached/1M
$0.075
128K context~135 tok/s

Support chatbots, summarization, JSON extraction

OpenAI o3OpenAI
Input/1M
$2.00
Output/1M
$8.00
Cached/1M
$0.50
200K context~52 tok/s

Deep math, architecture planning, complex code

OpenAI o4-miniOpenAI
Input/1M
$1.10
Output/1M
$4.40
Cached/1M
$0.28
200K context~95 tok/s

Fast STEM reasoning, agentic tool verification

Production FinOps Optimization Playbook

Keep Static System Prompts & Tool Schemas First

OpenAI caches exact prefix matches in 128-token increments after 1,024 tokens. Always place immutable instructions and JSON tool definitions at the top before dynamic user timestamps or IDs.

Route 80% of Traffic to GPT-4.1 mini or nano

Using GPT-4.1 mini ($0.40/$1.60) for classification, RAG retrieval grading, and drafts while escalating only complex synthesis to GPT-4.1 or o3 cuts bills by 65–80%.

Watch Reasoning Token Multipliers on o3 & o4-mini

OpenAI reasoning models bill hidden chain-of-thought tokens at the output rate. Always budget 2x–4x your visible word count when forecasting o3 or o4-mini workloads.

Frequently Asked Questions

How much does 1 million tokens cost on GPT-4.1 vs GPT-4o?

At reference public API rates, GPT-4.1 costs $2.00 per 1M input tokens and $8.00 per 1M output tokens ($0.50 cached input), compared to GPT-4o at $2.50 input / $10.00 output ($1.25 cached input).

Does OpenAI charge extra to write to the prompt cache?

No. Unlike Anthropic's explicit cache-write premium, OpenAI prompt caching is automatic and charges no write surcharge—you simply pay the discounted cached rate on hits.

How do I estimate OpenAI o3 reasoning token costs?

Visible answer words multiply by ~1.35 for output tokens, plus hidden reasoning tokens depending on reasoning_effort (low/medium/high). Increase Expected Output Words by 2x–3x in the calculator above to model medium reasoning.

Can I stack Prompt Caching with the OpenAI Batch API?

OpenAI Batch API gives a flat 50% discount on standard input and output rates for asynchronous 24-hour jobs. Toggle Batch API in the workbench to view exact per-100k-call batch totals.

Transparent SaaS Pricing

Free Forever Calculator. Upgrade When Spend Scales.

Model 25 LLMs with zero login today. Upgrade to Pro or Team for automated API price-drop alerts, saved CFO scenarios, and live usage overrun guards.

Free

No Signup
$0/ forever

Everything you need for architecture sizing, prompt tokenization, and SaaS margin checks.

  • Unlimited comparisons across 25+ models
  • Live client-side prompt token counter (EN/Code/CJK)
  • Prompt caching (0–90%) & Batch API 50% toggles
  • AI Agent & SaaS Gross Margin Simulator
  • 80/20 Model Routing Optimizer + inline rate edits
  • Unlimited CSV financial exports
Use Free Calculator Now
Most Popular

Pro

Founders & PMs
$15/ month

Never get blindsided by provider price changes or margin erosion across investor reviews.

  • Everything in Free, plus cloud-saved scenarios
  • Compare multiple multi-agent architecture versions
  • Weekly API price-drop & new-model email alerts
  • 1-click branded CFO / Board Deck PDF export
  • Custom enterprise discount profiles (AWS/Vertex/OpenAI)
  • Historical token price tracker & depreciation notices

Team

Live Guardrails
$39/ month

Connect real production token telemetry and catch runaway agent loops before the bill lands.

  • Everything in Pro for up to 10 team seats
  • Zero-latency live usage telemetry proxy endpoint
  • Real-time Slack & webhook budget overrun alerts
  • Per-customer / per-tenant gross margin leaderboard
  • Automatic anomaly detection on infinite agent loops
  • Scheduled weekly FinOps digest to #ai-infra