Self-Host vs API LLM Cost Calculator
Should you pay an AI provider per request, or run a model on your own servers? This LLM cost calculator compares the two: enter your volume and your real prices to see which is cheaper today, where the break-even point is, and how the answer changes as you grow.
Private by design: it runs in your browser and nothing you enter is sent to us.Your usage
The API
Running it yourself
Your comparison
Result: –
Setup: –
Per 1,000 requests: –
12 months: –
Break-even: –
Capacity: –
If your volume changes
| Requests / month | API | Self-host (servers) | Cheaper | By |
|---|---|---|---|---|
| – | ||||
These are estimates from your own inputs, not guarantees.
How the numbers are worked out
This calculator has no built-in prices. API prices change often, so you enter the current ones from your provider. Every result is arithmetic on your inputs.
| Result | How it is calculated |
|---|---|
| API cost per month | Requests × (input tokens × input price + output tokens × output price) ÷ 1,000,000. |
| Servers needed | Requests ÷ what one server can handle, rounded up, but never fewer than your minimum. |
| Self-hosted cost per month | Servers × server cost, plus maintenance hours × hourly cost, plus other monthly costs. |
| Setup payback | One-off setup cost ÷ the monthly saving, when self-hosting is cheaper. |
| 12-month total | API: 12 months of API cost. Self-hosted: setup cost plus 12 months of running cost. |
What cost does not tell you
The cheaper option on paper is not always the right one. Weigh these before you decide.
- Quality. A model you can run yourself may not do your task as well as a hosted one. Test it on your own examples before you commit.
- Data control. If data must stay in a particular country or never reach a third party, self-hosting can be the only option, whatever the cost.
- Reliability. A provider runs the servers for you. Self-hosting makes uptime, scaling and security your job.
- Speed. Response time depends on your hardware, the model and how busy the servers are.
- Utilisation. A server costs the same whether it is busy or idle, which is why volume decides this comparison.
- Hybrid. Many teams use a hosted API for hard or unpredictable work and their own model for steady, high-volume, simpler work.
Self-host vs API cost calculator FAQ
Where do I find API prices?
On your provider's pricing page, listed per million input tokens and per million output tokens. Use the current figures and re-run the comparison when they change.
How do I estimate tokens per request?
Most providers have a token counter or return the token usage with each response. Look at a sample of real requests and use the average. As a rough guide, a token is a little under a word of English text.
How do I know how many requests a server can handle?
Measure it. Run a realistic test on the model and hardware you plan to use, note how many requests per hour it sustains at acceptable speed, and convert to a month. If you do not know yet, leave capacity blank and the calculator counts only your minimum number of servers.
Is my data stored?
No. The calculation runs in your browser. The page address updates with your inputs so you can bookmark or share the result. Treat that link like any other and do not share it if the numbers are confidential.
Deciding where AI is allowed to run in your company? Draft the rules with the AI usage policy generator.