GPT 5.4 vs Claude Sonnet 5 pricing
Side-by-side token pricing for GPT 5.4 (OpenAI) and Claude Sonnet 5 (Anthropic), plus the total cost at three workload sizes so the crossover point is obvious. Prices refreshed 2026-10-28 12:57 UTC.
Reviewed by Mohammad Ghonchegi · dataset generated 2026-10-28 12:57 UTC · every figure below is recomputed from it on each refresh · how the numbers are produced
Which one is cheaper, and for what
GPT 5.4 and Claude Sonnet 5 sit at different points on the price curve: Claude Sonnet 5 charges $2 per million input tokens against $2.5 for GPT 5.4 — a 1.3× gap before any discount. On output they are billed at $15 and $10 respectively, which matters because output tokens are usually the larger line item once a workload is chatty. Blended 3:1 toward input, Claude Sonnet 5 comes out cheaper overall.
Workload shape decides the winner more often than the headline rate does. A prompt-heavy job (long documents, short answers) favours Claude Sonnet 5, because input dominates the bill. A completion-heavy job (short prompts, long answers) narrows the gap, because GPT 5.4 is only dearer on the input side: at $2.5 versus $2 per million input, a workload whose input is a small share of the total can land within a few percent of the cheaper option. Cache pricing changes this again: GPT 5.4 caches input at $0.25 versus $0.2 for Claude Sonnet 5, so a system prompt resent on every call is cheaper on Claude Sonnet 5.
Both columns come from the same pipeline and the same unit (USD per million tokens, refreshed together), so the comparison is like-for-like on price. It is not a quality comparison: identical token prices say nothing about accuracy, latency or rate limits, and enterprise agreements, regional pricing and batch modes are excluded. Confirm against each provider's own pricing page before committing to a contract.
| Metric | GPT 5.4 | Claude Sonnet 5 |
|---|---|---|
| Input $/1M tokens | $2.5 | $2 |
| Output $/1M tokens | $15 | $10 |
| Cached input $/1M | $0.25 | $0.2 |
| Context window | 1.1M | 1M |
| Max output | 128K | 128K |
| Vision | yes | yes |
| Tool calling | yes | yes |
| Cache pricing | yes | yes |
Total cost by workload
| Workload | GPT 5.4 | Claude Sonnet 5 | Cheaper |
|---|---|---|---|
| 1M tokens in · 300K out | $7 | $5 | Claude Sonnet 5 (29% less) |
| 10M tokens in · 3M out | $70 | $50 | Claude Sonnet 5 (29% less) |
| 100M tokens in · 30M out | $700 | $500 | Claude Sonnet 5 (29% less) |
On blended cost (weighted 3:1 toward input), Claude Sonnet 5 comes out cheaper by roughly 20% on input pricing. Pick Claude Sonnet 5 when the workload is price-sensitive and its context window covers your prompts; GPT 5.4 is the one to benchmark if you need vision, reasoning depth, or a different quality profile.
Frequently asked
› Is GPT 5.4 cheaper than Claude Sonnet 5?
On input pricing, Claude Sonnet 5 is cheaper ($2 vs $2.5 per 1M tokens). On blended cost the winner is Claude Sonnet 5, because output tokens are weighted differently for most workloads.
› Which has the larger context window?
GPT 5.4 offers the larger context (1.1M tokens).
› Do these prices include prompt caching?
Cached input is priced separately where a provider publishes a cache rate; the table above lists it per model so the comparison stays like-for-like.