Calculate AI API Cost Online

Estimate per-request cost for GPT-4o, Claude, Gemini, and more. Enter token counts and see input, output, and total pricing.

$0.00Input cost
$0.00Output cost
$0.00Total cost

How to use

  1. Select the AI model and enter input and output token counts.
  2. Or paste text and click "Count from text" to estimate input tokens.
  3. See input cost, output cost, and total per request instantly.

Frequently asked questions

How is AI API cost calculated?

Cost = (input tokens ÷ 1M × input price) + (output tokens ÷ 1M × output price).

Are these prices up to date?

Pricing reflects published API rates as of early 2026. Always verify on the official pricing page.

Can I count tokens from text?

Yes. Paste text and click "Count from text" to estimate input tokens.

Is my data sent to a server?

No. All calculations happen in your browser.

Last updated

Powered by maratool