WRAITHERIX
Home / Blog
Measurement · tested 2026-12-03

How much does Claude Code cost? Two tasks, three models, real charges

WRAITHERIX team
Three glowing stacks of coins of different heights on a circuit board, each linked by a thin trace to a gateway block

There is no single price for Claude Code. It bills tokens, not hours, and one session is several model requests. How many requests it makes and which model answers them is up to you, and that choice moves the bill by two orders of magnitude.

Short version: on two small tasks, a session cost from a fraction of a cent on the smallest model to about 20 cents on the largest. All six sessions succeeded.

What we ran

Claude Code 2.1.333 on macOS, in an empty folder with a clean home directory so no old settings interfered. The address and key went in through environment variables, the way our setup guide describes. Two tasks:

  1. Fix a bug: add in calc.py subtracts instead of adding. Fix it and run test_calc.py.
  2. Write from scratch: create wordcount.py with count_words(text) and test_wordcount.py with three tests, then run them.

Each task ran once per model: claude-haiku-5-5, claude-sonnet-5-5 and claude-opus-5-5. The command:

claude -p 'add in calc.py is broken. Fix it and run test_calc.py.' \
  --model claude-sonnet-5-5 --output-format json \
  --permission-mode acceptEdits --allowedTools Bash

-p runs one task and exits. --permission-mode acceptEdits lets the agent edit files and --allowedTools Bash lets it run commands. Keep the prompt right after -p, before --allowedTools. Our first attempt put it last, and Claude Code refused to start because it read the prompt as a value of the flag.

Claude Code fixing calc.py on Sonnet and running the test
One of the six sessions: a - b became a + b and the test printed ok.

Results

Every session ended with working code. We ran the tests ourselves after each one. Charges below are the sum of all requests in the session, taken from the WRAITHERIX usage log.

Model Task 1: bug fix Task 2: new code Time, task 1
claude-haiku-5-5 $0.0032 $0.0020 11 s
claude-sonnet-5-5 $0.0569 $0.0295 12 s
claude-opus-5-5 $0.2107 $0.1997 25 s

Per-million-token prices are in the catalogue; we do not copy them here so the numbers cannot go stale.

Where the money goes inside one session

One task is not one request. Each session produced 3 to 5 requests in the log: read the file, edit it, run the test, answer. Sonnet on the bug fix:

Request Charge
1st $0.0425
2nd $0.0055
3rd $0.0049
4th $0.0040

The first request cost almost eight times the second. Claude Code sends its own large system prompt every time, about 19,000 tokens according to the program's own usage report. The first request writes it to the cache and later ones read it at a lower price. Haiku looked the same: $0.0023 for the first request and a few hundredths of a cent for the rest.

So a one-question session costs almost as much as a five-step one, because the first request carries most of the bill. We covered caching and other ways to cut spend in how to reduce token usage in AI agents.

Claude Code's own estimate

The JSON output has a total_cost_usd field, the program's own estimate. On task 1 it said $0.0035, $0.0577 and $0.2342 against $0.0032, $0.0569 and $0.2107 in our log. Close, but about 10% off on Opus. Trust the usage log in your dashboard: that is what was actually charged.

What to do with this

How we tested

December 3, 2026. macOS 27.2.1, Claude Code 2.1.333, isolated home folder, test key, requests to https://api.wraitherix.com. One run per model and task: 24 paid requests, about 50 cents in total. A single session per table cell is a small sample. The orders of magnitude hold, exact figures will differ for you. The run log is saved.

One key for 400+ models

Pay as you go, below list price.

Get a keyCatalog