Beeija
← Back to Tools

AI Cost Calculators

Grok API Cost Calculator

Estimate xAI Grok API costs using requests, input tokens, cached input tokens, output tokens, and monthly usage.

Enter Your Grok API Usage

Use average token values for one request, then enter the expected number of requests in one month.

Price used per 1 million tokens

Input:$1.25

Cached:$0.20

Output:$2.50

Estimated Grok API Cost

This estimate covers the text token charges entered above.

Estimated monthly cost

$148.61

Per request

$0.002123

Per day

$4.9537

Per year

$1,​783.32

Uncached input cost

67,200,000 tokens

$84.00

Cached input cost

16,800,000 tokens

$3.36

Output cost

24,500,000 tokens

$61.25

Requests: 70,000

Total input tokens: 84,000,000

Total output tokens: 24,500,000

* Important: Calculated from the values currently shown. Default usage values are examples, so change them to match your expected usage. Built-in xAI rates were checked on June 18, 2026. Final charges may include higher-context pricing above 200K tokens, agent tools, web search, voice, images, video, storage, taxes, discounts, retries, and other services.

Grok API costs can change with the model, prompt size, answer length, request count, and cached input use. This calculator helps you test a small launch, a normal month, and a higher-usage case before you build.

How the Grok API Cost Calculator Works

Choose an xAI model and enter the expected requests per month. Then add the average input and output tokens used by one request.

You can also enter the share of input tokens that may use cached pricing. The calculator separates uncached input, cached input, and output costs.

The result shows the estimated cost per request, day, month, and year.

What to Enter for a Useful Estimate

Include the system message, prompt, chat history, retrieved text, and other content sent to the model in your input estimate.

Use the average answer length you expect in real use. Longer outputs can increase the monthly cost.

Test a normal case and a busy case so you can see how the cost may change as usage grows.

Common Ways to Use This Calculator

  • Estimate the monthly cost of a Grok chatbot.
  • Compare Grok models using the same workload.
  • Test the possible saving from cached input.
  • Estimate cost per request, day, month, and year.
  • Review the effect of longer prompts and answers.
  • Prepare an early xAI API budget.

Simple Grok API Cost Example

Imagine an AI assistant with 70,000 requests per month. Each request uses 1,200 input tokens and 350 output tokens. If 20% of the input may use cached pricing, enter those values and choose a Grok model.

The calculator will show the separate input, cached input, and output costs. You can then switch models without changing the workload.

Pricing and Estimate Notes

Built-in prices were checked against xAI's official model and pricing pages on June 18, 2026. xAI may change models, prices, limits, or billing rules at any time.

Built-in text rates are for standard-context requests up to 200K tokens. This calculator covers text token charges only. Agent tools, voice, images, video, storage, taxes, and other services may add separate costs.

Always check the official xAI pricing page before making a final budget or purchase decision.

Frequently Asked Questions

How is Grok API cost calculated?

The calculator multiplies uncached input, cached input, and output tokens by the selected xAI model rates. It then shows the estimated cost per request, day, month, and year.

What are cached input tokens?

Cached input tokens are repeated input tokens that qualify for a lower cached-token rate. The real amount depends on how your prompts and API requests are structured.

Can I compare Grok models?

Yes. Keep the same request and token values, then switch models to compare their estimated costs.

Does this calculator include tool charges?

No. It estimates text token costs only. Agent tools, web search, voice, images, video, storage, and other services may have separate charges.

Are the results exact?

No. They are planning estimates. Your final bill may change because of price updates, retries, taxes, discounts, tool use, or other paid services.

Can I enter my own xAI prices?

Yes. Turn on custom pricing and enter your own input, cached input, and output rates per million tokens.

Explore Related AI Cost Tools