TOOLBOX

LLM API Cost Calculator

LLM API cost calculator

LLM cost = (input tokens × input price) + (output tokens × output price), with prices quoted per million tokens. Output usually costs several times more than input, so long replies dominate the bill. Enter tokens and prices below to see the cost per request and the projected monthly total.

Cost per request
Input cost / req
Output cost / req

Frequently asked questions

How is LLM API cost calculated?
(input tokens × input price) + (output tokens × output price), prices per million tokens. Output usually costs 3–5× input.
Why is output more expensive?
Each output token needs a full forward pass through the model — more compute than reading input — so providers price it higher.
How do I estimate monthly cost?
Cost per request × requests per month. Enter your averages above for both figures.

Estimates only. Enter the current published rates for your provider and model — prices change often and vary by tier, caching, and region. Check the provider's pricing page for exact figures.