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:
- Fix a bug:
addincalc.pysubtracts instead of adding. Fix it and runtest_calc.py. - Write from scratch: create
wordcount.pywithcount_words(text)andtest_wordcount.pywith 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.

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.
- The bug fix cost 18 times more on Sonnet than on Haiku and 66 times more on Opus. For new code the ratios were 15 and 100.
- For tasks this small we saw no difference in the outcome. That says nothing about large projects. We tested two small tasks, not model quality.
- Opus was also slower: 25 seconds against 11 to 12.
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
- Start small edits, renames and tests on the cheapest model. Move up only if it fails.
- Set the model with
--modelor theANTHROPIC_MODELvariable. - Do not leave an expensive model as the default. One forgotten setting multiplies the bill by tens.
- Watch the balance in the dashboard: each request shows up there right away.
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.
