AI Cost Tools

LLM Cost Calculator

Estimate AI API spend from tokens, traffic, cache rate, and model choice.

Loading tool...

Complete Guide to Estimating LLM API Costs

LLM pricing is simple at the token level but harder at product scale. A single request has input tokens, output tokens, and sometimes cached input discounts. A real product also has traffic, retries, batch jobs, and model mix.

This calculator keeps the formula visible and applies the same workload across verified model prices so you can compare options before shipping an expensive workflow.

DocuShell starts with token and workload costs because that is the foundation for later document, RAG, and app-level AI cost planning.

The LLM Cost Formula

The baseline formula is: cost = input tokens x input price + output tokens x output price. Providers usually publish these prices per 1 million tokens, so the calculator normalizes every row to that unit.

Monthly cost then multiplies the per-request estimate by expected request count. Retry overhead increases the effective request count because failed or repeated requests can still consume tokens.

  • Input tokens: prompt, instructions, retrieved context, chat history, and documents passed to the model.
  • Output tokens: generated answer, extracted JSON, summary text, or agent response.
  • Cached input tokens: repeated context that some providers bill at a lower rate.

Cache and Batch Pricing

Caching can matter when the same system prompt, policy, tool schema, or document context appears repeatedly. If a provider lists cached input pricing, DocuShell applies that lower rate to the cached share of input tokens.

Batch pricing matters when requests can run asynchronously. If the selected model has listed batch input and output rates, turning on batch mode applies those rates in the comparison table.

What This Estimate Excludes

The v1 calculator focuses on text token economics. It does not add provider taxes, committed-use discounts, custom contracts, search or grounding fees, image/audio token rules, cache write charges, context storage, vector database costs, or embedding and reranking costs.

That boundary is intentional. It keeps the first tool understandable while leaving room for a future AI Cost Calculator for Documents and Apps that can model full RAG and document-processing pipelines.

Applying This to Document AI

Document AI cost usually starts with extraction and token volume. A PDF summary workflow might send extracted text to a model once per document, while a Q&A system may reuse chunks across many user questions.

For now, estimate the average tokens sent per request and the monthly request count. Later DocuShell modes can add pages, words per page, embeddings, reranking, and generated-answer volume directly.

How It Works

Step 1

Enter average input tokens, output tokens, monthly request volume, cache hit rate, and retry overhead.

Step 2

Choose a provider filter and optionally turn on batch mode for models with listed batch prices.

Step 3

Compare ranked per-request and monthly cost estimates with source links for each model price.

Why This Tool

  • Compare verified model prices across OpenAI, Anthropic, and Google in one table.
  • Estimate per-request and monthly spend before a prototype reaches production traffic.
  • Model cache hit rate, retry overhead, and batch pricing where providers list it.
  • See official source links and one pricing verified date for the current source set.
  • Run the estimate locally in the browser with no prompt, file, or document upload.

Use Cases

  • Forecasting monthly cost for an AI support chatbot.
  • Comparing models for RAG answers, agent steps, and document summaries.
  • Checking whether cache reuse or batch jobs will materially lower spend.
  • Building a first budget for PDF summarization, extraction, or Q&A workflows.

Frequently Asked Questions

Common questions about the LLM Cost tool, how it works, privacy, file limits, and more.

DocuShell multiplies input tokens by the model's input price, output tokens by the output price, and then multiplies the per-request total by expected monthly requests. Cached input, retry overhead, and batch pricing are applied when selected and listed for that model.
The initial registry uses prices that were visible on official OpenAI, Anthropic, and Google pricing pages when verified. The calculator shows official source links and one pricing verified date so you can recheck before procurement or production budgeting.
No. The calculator runs in your browser. Pasted text is used only to estimate token count locally and is not sent to DocuShell.
Provider bills can include tool calls, search, grounding, images, audio, cache writes, storage, regional processing, priority tiers, taxes, minimum commitments, and failed or retried traffic. This v1 calculator focuses on text token usage and clearly marks excluded charges.
This first release estimates LLM token and workload cost. It is designed to expand into document, embedding, reranking, and RAG pipeline modes on the same page.

Need a walkthrough before you start?

We publish first-party guides for the workflows people actually use, and we explain how those articles are tested, reviewed, and updated.

Local estimates and source-backed pricing

This calculator does not upload prompts, pasted text, or documents. Prices are curated from official provider pages with a visible pricing verified date, but you should confirm provider pricing before production budgeting.

Explore More Tools