What a website costs to build with AI
Building this website with Claude Code and Codex has cost $4,909 at published API list rates, about $0.12 for an average Claude Code request, and prompt caching saved $30,882. Most answers to what a website costs to build with AI are guesses, and this one is not. I counted the AI requests made while building this site from the logs on the machine that built it, then priced them at the rates the providers publish. You can download the same data as JSON or CSV and get the same totals.
- Total cost$4,909
- Tokens7.2B
- Requests and sessions39,262
- Per Claude Code request$0.12
Key findings
- Across Claude Code and Codex, 85% of the cost of building a website with AI went on storing and re-reading earlier context. An average Claude Code request cost $0.12 at API list rates and carried about 180,000 tokens.
- Re-reading earlier context took 51% of the cost of an AI-built website, while writing the actual output took 15%.
- Claude Code and Codex re-read 220 tokens of earlier context for every token they wrote, so in AI coding the length of a conversation, not of an answer, sets the cost.
- 97% of the tokens used to build a website with AI coding assistants were earlier context read again, so they averaged $0.68 per million at API list rates, against $4.96 without prompt caching.
- Prompt caching saved $30,882 on a website built with Claude Code and Codex, about 6.3 times what the work cost at API list rates.
- In AI coding, storing context for reuse was 3% of the tokens but 34% of the cost, and each stored token was read back about 34 times.
- The instructions and files you give an AI coding assistant came to 1% of the cost of building a website with it.
Covering to .
Spend over time
I show the same spending three ways, because each one answers a different question about how the cost of an AI-built website accumulates. The weekly columns show how the spending moved, the calendar shows each individual day, and the running total shows how it added up. If you want the exact figures, they sit in the two tables underneath.
By week
By day
- No usage
- Under $5
- $5 to $20
- $20 to $50
- $50 to $150
- $150 and over
Running total
Every week, as a table
| Week of | ISO week | Cost (USD) | Tokens | Running total |
|---|---|---|---|---|
| (3 days) | 2026-W31 | 114.52 | 100,808,169 | 114.52 |
| 2026-W32 | 347.65 | 413,304,990 | 462.17 | |
| 2026-W33 | 511.47 | 721,418,906 | 973.64 | |
| 2026-W34 | 483.50 | 769,332,222 | 1457.14 | |
| 2026-W35 | 1007.15 | 700,763,707 | 2464.29 | |
| 2026-W36 | 378.13 | 249,018,414 | 2842.42 | |
| 2026-W37 | 110.07 | 84,538,064 | 2952.49 | |
| 2026-W38 | 1.81 | 3,921,437 | 2954.30 | |
| 2026-W39 | 10.78 | 16,902,701 | 2965.08 | |
| 2026-W40 | 148.10 | 270,280,713 | 3113.18 | |
| 2026-W41 | 10.24 | 21,854,732 | 3123.42 | |
| 2026-W42 | 14.23 | 37,174,596 | 3137.65 | |
| 2026-W43 | 94.35 | 253,581,248 | 3232.00 | |
| 2026-W44 | 40.94 | 78,361,422 | 3272.94 | |
| 2026-W45 | 37.23 | 59,672,350 | 3310.17 | |
| 2026-W46 | 674.34 | 1,465,759,377 | 3984.51 | |
| 2026-W47 | 755.03 | 1,561,461,926 | 4739.54 | |
| (2 days) | 2026-W48 | 169.46 | 410,829,499 | 4909.00 |
| Total | 4909.00 | 7,218,984,473 | 4909.00 |
Every day, as a table
| Date | Cost (USD) | Tokens |
|---|---|---|
| 100.01 | 84,086,659 | |
| 14.51 | 16,721,510 | |
| 14.90 | 12,954,527 | |
| 120.29 | 141,927,279 | |
| 37.17 | 44,084,335 | |
| 69.33 | 88,003,652 | |
| 105.96 | 126,335,197 | |
| 139.18 | 194,125,711 | |
| 236.52 | 349,883,072 | |
| 135.77 | 177,410,123 | |
| 135.81 | 218,395,967 | |
| 166.17 | 344,191,526 | |
| 90.96 | 135,929,552 | |
| 90.56 | 70,815,177 | |
| 336.04 | 206,896,480 | |
| 308.63 | 190,312,025 | |
| 266.22 | 196,816,824 | |
| 47.78 | 55,519,898 | |
| 48.48 | 51,218,480 | |
| 19.70 | 23,989,668 | |
| 137.70 | 84,584,607 | |
| 103.22 | 59,816,485 | |
| 51.30 | 36,021,259 | |
| 18.53 | 16,147,590 | |
| 47.68 | 28,458,805 | |
| 102.26 | 65,455,640 | |
| 5.42 | 11,384,974 | |
| 2.39 | 7,697,450 | |
| 1.81 | 3,921,437 | |
| 3.71 | 3,117,113 | |
| 7.07 | 13,785,588 | |
| 2.21 | 2,563,641 | |
| 64.19 | 147,671,779 | |
| 18.89 | 46,469,556 | |
| 62.81 | 73,575,737 | |
| 6.66 | 14,116,927 | |
| 3.16 | 6,134,380 | |
| 0.42 | 1,603,425 | |
| 0.92 | 1,298,509 | |
| 13.31 | 35,876,087 | |
| 12.65 | 24,901,363 | |
| 18.51 | 33,215,207 | |
| 6.24 | 8,374,861 | |
| 51.28 | 179,728,657 | |
| 5.67 | 7,361,160 | |
| 1.12 | 2,005,498 | |
| 6.88 | 9,807,836 | |
| 17.77 | 38,645,940 | |
| 7.63 | 12,529,280 | |
| 7.54 | 15,372,868 | |
| 2.40 | 3,458,189 | |
| 12.68 | 25,351,447 | |
| 4.93 | 8,617,905 | |
| 3.00 | 4,233,622 | |
| 10.63 | 14,898,001 | |
| 2.12 | 2,187,332 | |
| 1.47 | 925,854 | |
| 3.89 | 5,072,724 | |
| 7.47 | 11,822,549 | |
| 4.74 | 6,784,572 | |
| 135.88 | 310,874,505 | |
| 381.09 | 840,948,611 | |
| 47.25 | 89,640,499 | |
| 94.02 | 200,615,917 | |
| 42.97 | 72,940,647 | |
| 260.91 | 526,972,835 | |
| 428.72 | 929,590,077 | |
| 7.48 | 11,411,960 | |
| 4.98 | 6,582,250 | |
| 9.97 | 13,964,157 | |
| 16.20 | 38,349,929 | |
| 153.26 | 372,479,570 |
Re-reading old context is 51% of the token cost
The ring and the bars split the same total by what the tokens were doing when I spent them.
Writing the actual output is 15%. Whenever an assistant continues a conversation it re-reads everything that came before, so most of the money buys memory, not new work. Did that surprise me? Yes. I had assumed the writing was the expensive part, and it is the part most cost estimates price, because the re-reading is invisible from the outside. Long conversations are expensive for the same reason long meetings are.
Here is why the cheap part wins. A token of output cost $22.47 per million, about 63 times a re-read token at $0.36. But the model re-read 220 tokens for every token it wrote, and volume beats price. Storing context for reuse is the other big slice, 3% of the tokens and 34% of the money, because a stored token bills at $8.09 per million. The instructions and files you add yourself came to 1%. For your own work it means the cheapest habit is a fresh conversation, started more often than feels natural.
Prompt caching saved 6.3 times what the build cost
The three figures compare the cost I measured with what the same work would have cost without caching.
All per-million rates on this page are blended across the models I used, the same limit as the model rates below.
97% of the tokens were context being read again, not written fresh, and across the models I used a re-read cost 7% of what the same token cost sent fresh. That is the whole mechanism behind the saving. I did nothing clever to earn it. Caching is on by default in both tools, yet it is the largest number on this page and most conversations about AI cost leave it out. If you are comparing tools on price, the cached input rate is the line I would read first.
Storing is the expensive step. Here it cost 1.7 times the fresh rate, and the cheap re-reads above earn that back fast. A stored token paid for itself on its first re-read, and the average one was read back 34 times. That is why I would leave caching on even when the storing line looks large. If your sessions are short and you rarely come back to the same context, you will read each stored token far fewer times, and save less.
Spread over all tokens, output included, the work came to $0.68 per million, and the same tokens without caching would have cost $4.96 per million. Output cost $22.47 per million here, so these two do not match the input prices above, and should not.
Cost by tool and model
By tool
Claude Code did most of the work here, so it carries most of the cost, $4,721 of $4,909, while Codex, which I used far less, came to $188. That split tells you how much I used each tool, not what either one charges per token. I would not compare them per record either, because Claude Code logs each individual request as a record while Codex logs a whole session as one.
| Tool | Cost (USD) | Share | Tokens | Records |
|---|---|---|---|---|
| Claude Code | 4720.59 | 96% | 7,061,533,770 | 39,245 |
| Codex | 188.41 | 4% | 157,450,703 | 17 |
By model
Each bar shows what one model cost in total. The second figure divides that cost by the tokens the model processed, which gives its effective cost per million tokens.
Cost per million tokens is the fairest way I have found to line the models up, but several things set it. One is the model's own list prices. The other is how its tokens split between cached re-reading, storing context for reuse, new input and output, because each of those bills at a different rate, and re-reading bills at a small fraction of the normal input rate. The longer a session runs, the more of it is re-reading, so the same model can average out very differently on two projects. Read these rates as a record of how I used each model, not a verdict on it. Your own mix would give you different numbers.
| Model | Cost (USD) | Tokens | Per million tokens (USD) |
|---|---|---|---|
| Claude Opus 5.5 | 1800.73 | 3,898,645,300 | 0.46 |
| Claude Opus 5 | 1435.83 | 1,896,495,443 | 0.76 |
| Claude Fable 5 | 961.07 | 552,949,021 | 1.74 |
| Claude Fable 5.1 | 342.61 | 232,498,329 | 1.47 |
| GPT-5.6 Sol | 188.41 | 157,450,703 | 1.20 |
| Claude Sonnet 5 | 92.80 | 280,181,757 | 0.33 |
| Claude Sonnet 5.5 | 85.63 | 198,702,553 | 0.43 |
| Claude Fable 5.2 | 1.67 | 748,879 | 2.23 |
| Claude Haiku 4.5 | 0.18 | 464,092 | not shown |
| Claude Haiku 5.5 | 0.07 | 848,396 | not shown |
I publish the same figures as JSON and CSV, so you can check them or reuse them.
Is that what I actually paid?
No. Two different numbers answer what a website costs to build with AI, and they are often confused for each other. The $4,909 above is what this work would have cost billed per token at published list rates. It is the only figure I can measure request by request, which makes it the right one for comparing ways of working with AI.
Both tools ran on monthly subscriptions, which charge the same flat fee whether you send one request or a thousand. On a project this size the subscription is the cheaper of the two, so I read the per token figure as a measure of how much work happened, not as a bill. If you are pricing a build of your own, a monthly seat is the number I would budget for, not $4,909.
Which claims about AI build cost hold up here?
These are claims you will often read about what AI coding costs. I checked them against the tokens I count here, priced at API list rates. Where a claim compares models, I price the same tokens at each model's rates, so only the price changes. Where the logs cannot settle a claim, I say so in the verdict and link the test. In the last column you can open a page with the claim. Some of those pages argue against it. So the link shows the claim is common, not that it holds.
| Claim | Verdict | Evidence | Where it appears |
|---|---|---|---|
| Prompt caching cuts the cost a lot | Holds | Without caching, the same work would have cost 7.3 times as much at list prices. | Prompt caching with Claude |
| Caching only pays in long sessions | Contradicted Test E2 · One long conversation against fresh ones | Storing a token for re-use costs more than sending it fresh, but one re-read paid the difference back here, so a conversation pays from its second request. Each stored token was re-read 34 times on average. | Prompt caching pays on the second call |
| Output is most of the bill | Contradicted | Writing output was 15% of the cost. Re-reading and storing the conversation was 85%. | LLM Cost Calculation Guide for Enterprise AI Teams in 2026 |
| Shorter prompts save money | Depends Test E2 · One long conversation against fresh ones | Text sent for the first time was 1% of the cost. Each request then re-reads the conversation so far, and re-reading was 51%, so a prompt costs most by staying in a long conversation, not by being long. | Prompt Cost Engineering: How to Cut LLM Token Spend Without Degrading Quality |
| The cheaper model costs half as much for the same work | Contradicted Test E1 · Model swap on matched tasks | Priced at Claude Sonnet 5.5, the same tokens cost 29% less than at Claude Opus 5.5, not 50% less, because both charge $0.20 a million tokens to re-read the conversation, and re-reading is most of the bill. | Claude Sonnet vs Opus: Which to Use in 2026 |
| The most capable model is too expensive for everyday work | Depends Test E1 · Model swap on matched tasks | Priced at Claude Fable 5.2, the same tokens cost 1.58 times as much as at Claude Opus 5.5, less than the twice its list prices suggest. Whether that is too much depends on the second attempts it saves. | Sonnet 4.6 vs Opus 4.6: When to Pay 5x More (March 2026) |
| AI coding keeps getting cheaper | Holds, in steps | The same tokens cost 43% less at Claude Opus 5.5 than at Claude Opus 4.5. Of the five steps from one release to the next, the price per token fell at one and held at the others. | Welcome to LLMflation – LLM inference cost is going down fast |
| Long context costs extra | Depends on the provider | Claude charges no long-context rate on any model priced here. OpenAI does, past a boundary it does not publish. Assuming 128,000 tokens, it added 61% to the Codex cost. | Claude Sonnet 4 now supports 1M tokens of context |
| Reasoning tokens blow up the bill | Too small to call Test E4 · Reasoning effort | Reasoning was 38% of Codex's output tokens and 5% of its cost, over only 17 sessions. Claude Code's logs do not report reasoning separately. | Input vs. Output Tokens |
| A subscription is cheaper than paying per token | Depends on volume | An average Claude Code request here cost $0.12 at API prices, so a $20 plan matches the API bill at about 170 requests a month, a $100 plan at about 830 and a $200 plan at about 1,700. Below that, paying per token is cheaper. | Claude Max vs API Pricing: Which One Should You Pay For in 2026? |
| Sub-agents multiply token use | Can't tell yet Test E3 · Sub-agents against one thread | The logs this page reads do not mark which requests a sub-agent made, so they cannot be counted apart yet. | How we built our multi-agent research system |
Tests for what the cost logs cannot answer
Some claims need a test, not more logs, because the logs show what each request cost, but not what the same task would have cost done another way. These are the tests I have written up, with what counts as a result and how long each must run before I publish one. None has started yet, so none has a result. Better counting (E5) would change what I collect, and three of the other tests need it first.
The figures and verdicts update with each data refresh. If a verdict stops matching its evidence, nothing new is published until I rewrite it. A test starts only when I decide to run it, and until then it is listed as not started.
E1 · Model swap on matched tasks, Not started, needs E5 first
| Status | Not started, needs E5 first |
|---|---|
| Waits for | E5 · Better counting |
| How it works | Pairs of website tasks of the same kind, such as a page fix or a data step change, done once on the everyday model and once on the cheaper one, alternating which goes first. |
| What counts as a result | Each task's API price at list rates, and whether it passed its checks without a second attempt. |
| Minimum run | 10 matched pairs |
| How I will publish it | The cheaper model saves money if its task costs less in at least 7 of 10 pairs with no more second attempts. Too small to call under 10 pairs. |
| Would settle | The cheaper model costs half as much for the same workThe most capable model is too expensive for everyday work |
E2 · One long conversation against fresh ones, Not started, needs E5 first
| Status | Not started, needs E5 first |
|---|---|
| Waits for | E5 · Better counting |
| How it works | Runs of related small tasks, done either all in one conversation or each in a fresh conversation that starts from a short written handoff. |
| What counts as a result | The API price of each task at list rates. |
| Minimum run | 8 runs of each kind |
| How I will publish it | Fresh conversations are cheaper if their median task costs at least a quarter less. Too small to call under 8 runs of each kind. |
| Would settle | Caching only pays in long sessionsShorter prompts save money |
E3 · Sub-agents against one thread, Not started, needs E5 first
| Status | Not started, needs E5 first |
|---|---|
| Waits for | E5 · Better counting |
| How it works | Tasks that need a lot of reading, done either by one conversation reading the files itself or by handing the reading to sub-agents. |
| What counts as a result | Tokens and API price per task, with sub-agent requests counted from the flag E5 would add. |
| Minimum run | 10 tasks each way |
| How I will publish it | Sub-agents multiply use if their tasks take at least twice the tokens in 7 of 10 pairs. Too small to call under 10 tasks each way. |
| Would settle | Sub-agents multiply token use |
E4 · Reasoning effort, Not started
| Status | Not started |
|---|---|
| How it works | The same kind of task done in Codex at low and at high reasoning effort. |
| What counts as a result | Reasoning tokens, their share of the session's API price, and whether the task passed its checks. |
| Minimum run | 10 tasks at each effort |
| How I will publish it | Reasoning drives the bill if its share of the price is above half at high effort. Too small to call under 10 tasks at each effort. |
| Would settle | Reasoning tokens blow up the bill |
E5 · Better counting, Not started
| Status | Not started |
|---|---|
| How it works | The collector would also record a scrambled session key and whether a request came from a sub-agent. Both would stay private; only totals would be published. |
| What counts as a result | New rows carrying both fields. |
| Minimum run | 30 days of collection |
| How I will publish it | Ready when 30 days of rows carry both fields. Nothing would be published from it alone; E1 to E3 would read from it. |
| Would settle | No claim in the table above |
Questions about AI build cost
- How much does a website cost to build with AI?
- This one has cost $4,909 so far at API list rates, across 39,262 logged requests and sessions, and an average Claude Code request cost $0.12. That splits into Claude Code at $4,721 and Codex at $188. The figure covers all of the design, content, code, SEO and release work I have done with AI assistance on this site.
- Did Claude Code or Codex cost more?
- Claude Code, at $4,721 of the $4,909 total, about 96%. Codex came to $188. The split mostly reflects how much I used each tool, because Claude Code handled 7.1 billion tokens and Codex 157 million. Per token, Codex worked out at $1.20 per million and Claude Code at $0.67 per million. I would not compare them per record, since Claude Code logs one record per request and Codex one per session.
- Is that an actual bill?
- No. Both tools ran on monthly subscriptions, which charge a flat fee, not a price per token. The figure is what the same work would have cost at the published pay as you go rates. I use it to compare ways of working with AI, not as an invoice.
- Why is the token count so much larger than the cost suggests?
- Because 97% of the tokens are context being read again, not written fresh. Whenever an assistant continues a conversation it re-reads everything that came before. Across the models I used, a cached re-read cost 7% of the normal input rate, so a very large token count can still carry a modest cost. Averaged over every token, the work came to $0.68 per million.
- What did caching actually save?
- $30,882. Without caching the same work would have cost $35,791 instead of $4,909, roughly 6.3 times more. It is the single largest cost decision in the project, and I did not have to make it, because caching is on by default.
- How can I keep the cost of AI coding down?
- Shorter conversations, more than shorter prompts. Here 51% of the money went on re-reading earlier context and 1% on the instructions and files themselves. So trimming a prompt saves almost nothing, while a fresh conversation stops every later request from carrying the old context. I would also leave caching on. A stored token paid for itself on its first re-read here, and the average one was read back 34 times.
- Which tools and models are counted?
- Claude Opus 5.5, Claude Opus 5, Claude Fable 5, Claude Fable 5.1, GPT-5.6 Sol, Claude Sonnet 5, Claude Sonnet 5.5, Claude Fable 5.2, Claude Haiku 4.5 and Claude Haiku 5.5, used through Claude Code and Codex. I do not count work done in the Claude or ChatGPT web apps, because those apps do not record token usage on my machine.
- How accurate is this?
- The token counts are exact. They are what each service reported for each request, not an estimate worked back from the text. I take prices from the official published rate cards for each provider and review them regularly, so the totals follow any change. One figure is an assumption. OpenAI charges more past a context size it does not publish, so I assume a boundary of 128,000 tokens. Claude has no such surcharge.
- Can I reuse these numbers?
- Yes. I publish the full dataset as JSON and CSV at stable addresses under a Creative Commons Attribution licence. Attribution to eduarddziak.com is all I ask.
How this is measured
The figures come from the session logs that Claude Code and Codex write on the machine this site is built on. A request records what it used, so the token counts are measured, not estimated. The same request appears in several log files when a session is resumed, so I match records on their request identifier and count it once. Without that step the totals roughly double. I would be quietly reporting twice the work that happened, and I nearly did. Codex reports a running total for a whole session instead of one figure per turn, so I take only the final figure of a session. I read no prompt, no message, no file name and no file path, so only counts, model names and timestamps leave the collector. If you rebuild the totals from the download and land on my numbers, that is the whole method working.
I price every request at the rates on Anthropic's pricing page and OpenAI's pricing page, last checked 17 November 2026.
OpenAI charges a higher rate past a context boundary it does not publish. This figure is an assumption. I assume a boundary of 128,000 tokens, and I classify a Codex turn on its own size, so a session blends across both rates instead of being forced onto one of them. If your own logs sit near that boundary, this assumption is the one figure of mine you should not copy without checking. Claude has no long-context surcharge. Models 4.6 and later bill the full context window at standard rates. Every figure is priced at published API list rates, even though the subscription plans the tools ran on do not bill per token.
Covering to . Last updated .