LLM API Cost Calculator
Enter input and output token counts plus a daily call volume to estimate per-call and monthly API spend against a built-in reference price list covering GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 and more. Prices are for reference only - always check the vendor's current pricing.
FreeOnline Tool
Loading…
How to Use
- Pick a model from the dropdown (GPT-4o, GPT-4o mini, GPT-4 Turbo, Claude 3.5 Sonnet, Claude 3 Haiku, Gemini 1.5 Pro or Gemini 1.5 Flash).
- Enter the number of input tokens and output tokens for the call.
- To project a monthly figure, fill in "calls per day" - the tool multiplies per-call cost by calls per day by 30. Leave it blank or at 0 to see only the per-call cost.
- The result is shown in both US dollars (USD) and Chinese yuan (CNY), converted at a built-in reference rate.
- Press "Load sample data" to see the calculation on a typical input/output pair.
- The full built-in price list is printed at the bottom of the page, showing the per-million-token price for each model.
Features
- Reference pricing for seven mainstream models: GPT-4o, GPT-4o mini and GPT-4 Turbo (OpenAI), Claude 3.5 Sonnet and Claude 3 Haiku (Anthropic), Gemini 1.5 Pro and Gemini 1.5 Flash (Google), all quoted in US dollars per million tokens.
- A prominent notice at the top of the page states that the prices are indicative only and that the vendor's latest official pricing takes precedence, along with the date the price data refers to, so nobody bases a budget on stale figures.
- Input tokens and output tokens are priced separately, matching how the major LLM APIs actually bill.
- Optional daily call volume produces a 30-day monthly estimate automatically.
- A built-in reference USD/CNY exchange rate shows the cost in both currencies; the rate is likewise marked as indicative only.
- Pure local JavaScript calculation with no external API or CDN calls.
Use Cases
Budgeting before you integrate
Estimate expected monthly spend before wiring an OpenAI, Anthropic or Google model into a project, to support vendor choice and budget sign-off.
Comparing value across models
For the same workload, compare what GPT-4o, Claude 3.5 Sonnet and Gemini 1.5 Flash would cost and pick the better deal.
Costing high-volume workloads
Project total monthly spend for support bots or bulk content generation by entering a realistic daily call volume.
Budgeting in Chinese yuan
See the cost in CNY directly when planning budgets in China, without converting the dollar figure yourself.
FAQ
Are these the vendors' live prices?
No. The built-in prices reflect publicly published figures from an earlier point in time and are meant for rough budgeting only. They may differ from current pricing, so always bill against the numbers on the provider's own pricing page.
How is the monthly cost worked out?
Monthly cost = per-call cost x calls per day x 30 days. It is a deliberately simple model that ignores traffic fluctuation, cache-hit discounts and similar factors.
Is the CNY exchange rate live?
No. A rough reference rate is built in purely for display; it is not a live rate and should only be used for ballpark budgeting.
Which models are included?
Seven models: GPT-4o, GPT-4o mini, GPT-4 Turbo, Claude 3.5 Sonnet, Claude 3 Haiku, Gemini 1.5 Pro and Gemini 1.5 Flash. The complete price table is at the bottom of the page.