Free tool
AI API Cost Calculator
Estimate monthly AI inference costs from request volume, input and output tokens, and your model’s prices per million tokens.
Formula and assumptions
Monthly cost = requests × (input tokens × input price + output tokens × output price) ÷ 1,000,000.
Use the prices for your model and service tier. Enter the weighted average price if cached input has a different rate. Billed tools, hosting and tax are separate.
Worked example
At $1 per million input tokens and $3 per million output tokens, 1,000 requests with 2,000 input and 500 output tokens each cost $3.50.