Long-Context LLM Cost Calculator

Model large prompts and a user-entered context surcharge.

Estimated workload cost USD 670.00
Inputs
Try:
Display denomination only. No exchange-rate conversion is applied.
tokens / request
Average billed input tokens per request.
requests / month
Requests at the entered long-context rate.
USD / 1M tokens
Standard input rate.
tokens / request
Average output tokens per request.
USD / 1M tokens
Output rate.
%
Extra percentage applied to input cost when a provider tier applies.
Results & Graph
Estimated workload cost
USD 670.00

Estimated workload cost

Graph 1 • Calculator-specific flow Shows the calculated components and current result from this tool.
Estimated workload costInput640Output30Context surcharge0Estimated workload cost: USD 670.00
Graph 2 • Modeled quantities Compares the values returned by the active calculation.
Input 640 Output 30 Context surcharge 0
Graph 3 • Calculation checkpoints Displays the engine’s named calculation points in order.
0cost 345.6cost 691.2cost Input: 640 cost 640 Input Output: 30 cost 30 Output Context surcharge: 0 cost 0 Context surcharge
Summary: Entered long-context surcharge adds USD 0.00 to a base token cost of USD 670.00.
Summary: Entered long-context surcharge adds USD 0.00 to a base token cost of USD 670.00.
⚠️ Rates and surcharge are user-entered; verify current provider pricing.
Interactive chart & math engine powered by CalculatorGraph

Formula: Long-Context LLM Cost Calculator

Requests × [(input tokens × input rate) + (output tokens × output rate)] / 1M, plus input-tier surcharge.
Requests × [(input tokens × input rate) + (output tokens × output rate)] / 1M, plus input-tier surcharge.
  • Inputs: All units, rates, and allowances are entered by the user.

Rounding: Displayed values are rounded for readability; package and item quantities round upward.

Frequently Asked Questions

Does the surcharge apply to output tokens too?

No. The engine multiplies only the input cost by the surcharge percentage. In the default, output costs $30 whatever surcharge you enter. If your pricing page also raises the output price for long prompts, increase the output rate field yourself to the long-prompt output price, and leave the surcharge covering input only.

Why does the interpretation call $670 a base token cost?

Base here means input plus output before any surcharge. The engine adds the surcharge on top of that. With 0% entered the base and the total are the same, so the line shows a $0.00 surcharge on $670 of tokens. With 50% entered, the base stays at $670 and the total becomes $990 a month.

Should the input token count include the question as well as the document?

Yes. Count everything sent in the request: the document, any instructions, conversation history, retrieved passages and the user's question. Providers bill all of it as input. For long-context requests the document usually dwarfs the rest, but system instructions and history can still add several thousand tokens on every call.

How do I convert a document's page or word count into tokens?

Use the provider's tokenizer or token-counting tool on a sample of your actual text. Token counts per word vary by language, formatting and content type, and code or tables often use more tokens than plain prose. A rough estimate is fine for a first pass, but measure a real file before using the result as a budget.

Can I use the calculator for a single request?

Set monthly requests to 1 and the result is the cost of one call. With the default token counts and rates that is $0.67. This is a quick way to check a one-off job, such as summarising a long report, before running it. Multiply by the number of documents to price a batch.

What does a 100% surcharge mean?

It doubles the input cost. On the default workload, input goes from six hundred and forty dollars to twice that, while output stays at $30. If your pricing page shows the long-prompt input price as double the normal one, a 100% surcharge is the matching entry, or you can enter the doubled price as the input rate instead.

Why is the result zero when requests are zero?

Every term in the formula is multiplied by the number of requests, so zero requests means zero cost. The page has no fixed monthly fee, minimum commitment or storage charge. If your provider bills any of those, add them outside the calculator. The result only ever reflects tokens sent and received.

Does a longer output answer change the cost much?

Less than you might expect for this kind of workload. In the default, output is 2,000 tokens a request and costs $30 a month against six hundred and forty for input. Even ten times the output would add two hundred and seventy dollars a month, less than the jump from 128,000 to 192,000 input tokens. Output matters more for short prompts with long answers.

What is the difference between this and a general monthly API budget?

This page is built around one heavy workload with a large prompt and a possible long-prompt price. A general budget page usually mixes many request types. Use this one when a few big requests dominate spending, and price the rest of your traffic separately, so the long-context surcharge is not applied to short requests that never reach the threshold.

Will the result match my invoice exactly?

Only if the token counts and rates are exact and your provider bills the way the formula assumes. Invoices can differ through caching discounts, batch pricing, rounding of token counts, retries, and threshold rules that price only part of the prompt at the higher rate. Treat the result as a planning estimate and check it against a week of real usage.

Is it cheaper to split one long document into several shorter requests?

Not automatically. Splitting reduces tokens per request but multiplies the number of requests, and any instructions or shared context are sent again with each piece. It can help when a long-prompt price applies above a threshold and each piece stays under it. Model both designs on this page with the same rates and compare totals before changing your pipeline.

How 128,000 input tokens become $670 a month

The default workload is 1,000 requests a month, each sending 128,000 input tokens and receiving 2,000 output tokens. Input is priced at 5 per million tokens and output at 15 per million. The surcharge starts at 0%.

Work through it once by hand. 1,000 requests of 128,000 tokens is 128 million input tokens, and at 5 per million that is six hundred and forty dollars. Output is 2 million tokens at 15 per million, which is $30. Together they make the $670 shown at the top of the result, and with no surcharge entered, the interpretation line says the surcharge adds nothing.

The split is the point of this calculator. Output is a rounding error here. More than 95% of the money goes on input, even though input is the cheaper token. That is what long-context work looks like: a large document, codebase or transcript goes in, and a short answer comes back.

Divided by requests, the default costs $0.67 a request. That per-request number is usually the one to check first, because it tells you whether a single big prompt is affordable before you multiply it by a month of traffic.

Context length is the input that decides the bill

Because input dominates, the result tracks context length almost one for one. Cutting each request to 76,800 tokens, sixty percent of the default, brings the month down to $414 in total. Raising it to 192,000 tokens pushes it to $990 a month. The output cost of $30 stays fixed in all three, so nearly all of the change is input.

A useful rule falls out of the default rate. At 5 per million, every extra thousand input tokens per request costs half a cent a request, or $5 a month at 1,000 requests. That makes it easy to price a design choice, such as attaching one more reference file or keeping a longer conversation history, without rerunning the page.

This is also why trimming context is usually a better saving than shortening answers. Halving the output on the default saves $15 a month. Removing a fifth of the input saves well over a hundred.

What the long-context surcharge field actually does

The surcharge is a percentage added to the input cost only. Output is not marked up. At the default 0% the page is a plain token cost calculator. Enter 50% and the interpretation line reports an extra three hundred and twenty dollars on top of a base token cost of $670, for a total of $990 a month.

Notice that 128,000 tokens with a 50% surcharge costs exactly the same as 192,000 tokens with none. That equivalence is a handy way to think about the field: a surcharge on input behaves like sending proportionally more tokens at the normal price.

Pricing pages describe long prompts in a few different ways, so decide which one your provider uses before filling this in. Some list a higher input price that applies once a prompt crosses a stated length. Others express it as a multiple of the normal price. If you have the two prices, the surcharge is the long-prompt price divided by the normal price, minus one, as a percentage. A long-prompt price one and a half times the normal one is a 50% surcharge.

The alternative is simpler and avoids mistakes: put the long-prompt input price straight into the input rate field and leave the surcharge at zero. Both routes give the same total.

Because the field is a plain percentage, it is easy to test a range. Try the default with 25%, 50% and 100% surcharges and look at how each compares with the $670 base. If the decision you are making only works at the lowest surcharge, the pricing page deserves a second, careful read.

When a tier threshold applies to the whole prompt

This page applies the surcharge to every input token in every request. That matches a pricing scheme where crossing the threshold reprices the entire prompt. It does not match a scheme where only the tokens above the threshold cost more.

Read the pricing page wording carefully. Phrases about prompts longer than a given length usually mean the whole request moves to the higher price. Phrases about tokens beyond a given length usually mean only the excess does. If it is the second kind, the page will overstate the cost, and you are better off running it twice: once for the portion under the threshold at the normal rate, and once for the excess at the higher rate, then adding the results.

Mixed traffic needs the same treatment. If only some requests are long, run the long ones here with the surcharge and run the short ones separately without it. Averaging token counts across both kinds hides the threshold and can put every request on the wrong side of it.

Output pricing can follow a tier as well. Some providers raise the output price for long prompts too. The surcharge field will not do that for you; raise the output rate by hand if your pricing page says so.

A worked example shows how far apart the two readings can be. Take the default 128,000 token prompt and imagine a threshold well below it. If the whole prompt is repriced with a 50% surcharge, the month is $990 rather than $670 a month. If only the tokens past the threshold are repriced, the true figure lands somewhere between those two, closer to $670 the higher the threshold sits. The page will always show the upper figure, so it errs on the side of caution.

Reading input and output rates from a pricing page

Both rate fields expect a price per one million tokens. If the page you are reading quotes per thousand tokens, multiply by a thousand first. Mixing the two is the most common way a long-context estimate comes out wildly wrong, and with 128 million input tokens in the default, the error is large.

Match the rate to the way the request will actually run. Pricing pages often list a standard rate, a batch rate for jobs that can wait, and a cached or reused input rate. Long-context jobs are good candidates for batch processing when nobody is waiting on the answer, so check whether that cheaper rate fits your use.

The currency selector changes the symbol in the result, not the numbers. Enter rates in the currency you are billed in, and convert afterwards if you need to report in another one.

Once the rates are in, compare the per-request figure with a single call in your provider's usage log. The default works out to $670 over 1,000 requests, so one request should cost $0.67 on those rates. If the log shows a figure a thousand times different, recheck the units before trusting the monthly total.

Caching and repeated documents are not modeled

The formula charges full price for every input token every time. In real long-context use the same large document is often sent again and again, for example when several questions are asked about one contract or one repository.

Where a provider offers a lower price for cached or repeated input, the real bill for the default workload can be far below the $670 this page shows. This page does not have a cache field. To approximate it, work out what share of input is a repeated prefix, then lower the input rate to a blend of the normal and cached prices. If half the input is cached at a tenth of the price, the blended rate is 2.75 per million instead of 5 for every million tokens.

There is a trade-off on the other side too. Caching sometimes carries a charge for storing the context or a short expiry, so a document asked about once a day may not benefit. Only count it as cached if the repeats happen inside the window the provider allows.

With that blended rate of 2.75 entered, the default workload drops well below the $670 full-price figure, while output stays at $30. Run it both ways and you have a realistic range for the month.

Checking whether long context is the right design

The comparison that matters is often not one model against another but long context against retrieval. Sending a whole document every time costs $0.67 a request in the default, or $670 a month. A retrieval setup that sends only the relevant passages might send a tenth of that, which this page can price by dropping the input tokens.

Run the two designs side by side. Keep requests and rates the same, set input tokens to the full document for one run and to the retrieved excerpt plus question for the other. The difference is the monthly budget you are trading for the simplicity and recall of sending everything.

Then weigh the result against quality, which this page cannot measure. Long context avoids missed passages, and for legal, code review or audit work that can be worth paying for. For routine questions over a large knowledge base, the saving from shorter prompts usually dominates once request volume grows past the default 1,000 a month.