# Cost forecasting

> Cost forecasting is multiplying token counts by the provider's published rates, then by how often the workflow runs.

Estimating spend from token volume, rates, and how often a workflow runs.

Track: Ship & Maintain
Access: free
Card: https://buildsparkai.com/cost-forecasting
Plain text: https://buildsparkai.com/cost-forecasting.md
Last checked: 2026-10-18

## What it is

Providers publish a price per token, and input and output are different rates. OpenAI's pricing page lists standard prices per 1,000,000 tokens, with separate columns for input, cached input, and output, and a higher long-context rate on some models. Anthropic's pricing page lists base input tokens and output tokens in USD per million tokens, plus separate cache-write and cache-hit rates. A forecast is those rates times the tokens one run uses, times how many runs you expect. The run count is an assumption until you have measured traffic. Cached input is a different rate from uncached input. This card does not invent a market price.

## Why it matters

**Cost.** The forecast is only as current as the pricing page. Copy the input, cached-input, and output rates for the model you will ship, and write the date next to them. OpenAI's page prices cached input separately from uncached input. Anthropic's page does the same with cache hits.

**Quality.** A forecast that prices output tokens at the input rate will be low on the rows checked for this card. On OpenAI's gpt-4.1 standard short-context row, output is $8.00 per 1,000,000 tokens and input is $2.00. Those amounts are vendor-reported.

**Risk.** A monthly number with no alert is a guess you will not notice until the invoice. Pick the number that should slow or stop the feature, and open the pricing page again on launch day.

## Try today

On one real request, write uncached input tokens, cached input tokens, and output tokens as three numbers. Open the provider's current pricing page, copy the matching rates, and multiply. Then multiply by a monthly run count you label as an assumption.

## Common mistake

Using one remembered price per request. Input, cached input, and output are different rates, and a longer prompt can cross into a higher column on the same pricing page.

## Self-check

What do you multiply to forecast spend?

Token counts, the published rate for each kind of token, and how often the workflow runs

## Practice and deep

Coming soon. One real request, three token counts, rates copied from the pricing page with the date, and a monthly assumption labelled as an assumption.

Coming soon. How OpenAI's pricing table separates cached input and long context, and how Anthropic's table separates cache writes from cache hits.

## Sources

- [OpenAI, API pricing](https://developers.openai.com/api/docs/pricing)
- [Anthropic, Pricing](https://platform.claude.com/docs/en/about-claude/pricing)

Opened 2026-10-18. Vendor, framework, or standards docs. This card does not add a rate, a usage count, or a score of its own. Numbers quoted from a source are labelled vendor-reported or as that document's own words. The gpt-4.1 standard short-context rates in the picture were read on OpenAI's pricing page on 2026-10-18.
