How the Claude Code ROI Calculator turns 4 inputs into a dollar figure. Every constant is listed here with a source.
Annual savings = (hours saved per PR) × (PRs per year) × (hourly labor cost) − (tokens per PR × PRs per year × blended $/token).
Payback period converts annual token cost back into working weeks against annual savings.
| Constant | Value | Source / rationale |
|---|---|---|
| Baseline hours per PR | 4 h | Published averages for senior engineer PR cycle time: author + self-review + context switching. See GitClear & Stripe developer productivity reports. |
| Working weeks per year | 48 | 52 calendar weeks − 4 weeks PTO/holidays. |
| Time reduction, light | 15% | Occasional use: bug diagnosis, refactor assist. |
| Time reduction, moderate | 35% | Default adoption. Claude drafts the PR, human reviews. |
| Time reduction, heavy | 55% | Agent-first. Humans review only high-risk paths. |
| Tokens per PR, light | 120,000 | Small context window, 1–2 iterations. |
| Tokens per PR, moderate | 400,000 | Typical dev session with tool use + reviews. |
| Tokens per PR, heavy | 900,000 | Long agentic runs, broad context. |
| Blended $ per 1M tokens | $8 | Weighted mix of Sonnet input/output at current Anthropic public pricing. Updated quarterly. |
This is a directionally-correct first pass. Use it for budgeting conversations, not for signed contracts.
The math lives at src/lib/roi.ts. PRs welcome.