Historical comparison. GPT-4o and Claude 3.5 Sonnet are older models. This URL is kept so existing links work. Both providers have released newer families since (see the current models list on our home page), and the table below shows whatever OpenAI and Anthropic models are active in our catalog, not these two specifically.
Historical comparison

GPT-4o vs Claude 3.5 Sonnet

This page started as a head-to-head of two 2024 flagship models. The comparison method still applies when you weigh any OpenAI model against any Anthropic model: decide what a usable answer looks like, then measure what each one costs you to get there.

Side-by-side pricing comparison

Active pay-as-you-go rates from our pricing catalog, sourced from each provider's official page. The catalog may lag new launches. Use the category filter to narrow the list.

Catalog rates are a single pricing snapshot, not a full tier schedule. This table does not select rates by prompt length; long prompts may cost more and change the ranking. Use the API cost calculator for supported Haiku 5.5 and xAI prompt tiers. Announced Google increases are not applied before their effective date.

Prices are per 1M tokens (standard pay-as-you-go). Always verify with your provider before budgeting.

Full comparison tool

How to compare an OpenAI and an Anthropic model yourself

Cross-provider comparisons are mostly about portability and fit. This method is tuned for picking between two providers' flagship-tier models.

  1. 01
    Cost per accepted result, not per token

    Run the same 30 to 50 real tasks through both. Divide total spend by the number of outputs you would actually use. A cheaper model that needs a second attempt one time in three is not cheaper.

  2. 02
    Hold the prompt constant, then tune once

    Start with an identical prompt to see raw behaviour, then allow one round of provider-specific tuning each. Report both numbers so you are not comparing your prompt skill.

  3. 03
    Count tokens per provider

    The two providers tokenize text differently, so the same prompt can bill a different number of input tokens. Read the token counts from each API response rather than assuming.

  4. 04
    Price the switching cost

    Note which features you relied on (tool calling format, caching, structured output). If moving later means rewriting those, add that engineering time to the comparison.

Sources and methodology

These official pricing references and our calculation methodology remain available while the live catalog loads. Confirm the provider's current rates and billing conditions before committing to a workload.

Frequently asked questions

Is GPT-4o or Claude 3.5 Sonnet still worth choosing?
Both are older models and may be retired or superseded. If either still appears in our table it means active pricing exists, not that we recommend it. For new projects, compare whatever current models each provider lists, using the method above.
Which is cheaper?
Check the table above for active catalog rates. At moderate volumes the price gap between flagship-tier models is often smaller than the difference in how many outputs you have to retry, so measure cost per accepted result.
Which is better for coding?
We do not publish a ranking. Public benchmark results change with every release and may not match your codebase. Run both on a sample of your own tasks and count how many pass your tests.
Can I switch between OpenAI and Anthropic without rewriting code?
Not directly, as the APIs differ. Proxy layers such as LiteLLM or OpenRouter expose a unified interface, which lowers switching cost. Designing for portability early helps.
Do these estimates include taxes or enterprise discounts?
No. Rates are standard pay-as-you-go prices from our active catalog, sourced from official pricing pages. Enterprise agreements, committed-use discounts, regional pricing, and taxes are not reflected. Confirm final pricing with the provider.