AI Computer-Use / Browser-Agent Cost Calculator
Estimate what a screenshot-per-step computer-use or browser agent costs to run. Every step re-sends the whole transcript — so cost climbs super-linearly with the number of steps. Price it across Claude and OpenAI, and see how screenshot pruning and caching cut the bill. No signup, no API key, nothing leaves your browser.
How it works
A “computer use” or browser agent works in a loop: take a screenshot, send it to the model, the model replies with an action (click, type, scroll), you execute it, take a new screenshot, and repeat. The catch is that the API is stateless — on every step you re-send the entire conversation so far: the system prompt and tool definitions, plus every prior screenshot and every prior assistant action. Screenshots are billed as image tokens, so the run accumulates a large, growing bill.
Image tokens per screenshot.Anthropic's vision documentation gives the formula img = ceil(width × height / 750), capped at about 1,600 tokens on standard-resolution models and about 4,784 tokens on high-resolution models (Opus 4.8, Sonnet 5, long edge up to 2,576px). A 1280×800 screenshot is therefore about 1,366 tokens. OpenAI's computer-use model uses a tiled formula instead — roughly 85 base tokens plus 170 per 512×512 tile — so the same screenshot lands at a different token count, which the comparison row makes explicit.
Per-step and total input. Let S be the system-plus-tools tokens, img the image tokens per screenshot, A the average output tokens per step, and T a fixed 50-token tool-result envelope. Keeping every screenshot, step N sends S + N × img + (N − 1) × (A + T) input tokens; pruning to the last K replaces N × img with min(N, K) × img. Summing over all steps gives the total input; total output is simply steps × A. Cost is input/1e6 × rate_in + output/1e6 × rate_out, using each model's per-million rate from the pricing docs.
The two levers.Because the screenshot term grows with the square of the step count, keeping every screenshot is what makes long runs expensive. Anthropic's computer-use guide recommends pruning to only the last few screenshots — the calculator prices that directly. Prompt caching is the second lever: the stable prefix carried over each turn reads at 0.1× of the input rate after a one-time 1.25× write, per Anthropic's prompt-caching economics. The calculator applies the closed-form total and cross-checks it against a step-by-step summation, so the numbers reconcile to the token.
Worked examples
Frequently asked questions
Sources & references
- Anthropic — Vision (image token formula and resolution caps)
- Anthropic — Computer Use tool (screenshot loop, recommended resolutions, pruning)
- Anthropic — Pricing (per-model input/output rates)
- Anthropic — Prompt caching (cache read/write economics)
- OpenAI — Computer use tool & pricing (comparison row)
- OpenAI — Images (tiled vision token formula)
Rates and formulas on this page were last cross-checked against the sources above on 2026-07-11. The Claude figures are authoritative; the OpenAI row is transcribed and dated, since provider prices change. Every worked example is reconciled by hand in the module source.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.