LLM API Cost Calculator
For developers and product teams budgeting an AI feature before launch. You get input cost, output cost, cost per request and the total for your request volume, using editable per-million-token rates.
Close the gaps with real-world projects
Build industry projects on ByteLabs and add verified proof of your skills to your public profile.
How to use the LLM Cost Calculator
- Pick a model to load its indicative input and output rates, or type your own rates per 1M tokens.
- Enter the number of requests.
- Enter input tokens and output tokens per request.
- Click Calculate cost to see input, output, per request and total cost.
An example, step by step (example only)
You enter
GPT-4o preset ($2.50 in, $10.00 out per 1M), 1,000 requests, 1,500 input and 500 output tokens each
The tool shows
Input $3.7500, output $5.0000, per request $0.0088, total $8.7500 (rates are editable estimates)
Questions about the LLM Cost Calculator
How is LLM API cost calculated?
Cost is input tokens divided by 1 million times the input rate, plus output tokens divided by 1 million times the output rate, multiplied by the number of requests. Output tokens usually cost several times more than input.
Are the model prices in this calculator current?
They are indicative list prices dated in the tool and can go out of date. The rates in the tool are editable estimates, not live quotes. Check the provider pricing page and type the current rates into the rate boxes.
How can I lower the cost of an LLM feature?
Shorten system prompts, cap max output tokens, cache repeated context where the provider supports it, and route simple requests to a smaller model. Re-run the calculator with each change to see the effect.
Is the LLM Cost Calculator free and private?
Yes. It is free, needs no sign-up and runs entirely in your browser, so what you type is not uploaded. You only sign in if you want to email a result to yourself or save it to your CareerByteCode profile.