All free tools

LLM Cost Calculator

Estimate monthly OpenAI or Claude API costs from tokens, or use your actual bill to see what you spend per paying customer.

Your numbers

API spend

Use spend for the product and month you’re measuring.

Subscription economics

Optional. Use paying customers and their average monthly price for the same period.

Amounts are in USD. Your entries stay in your browser.

Your result

Worked example

Monthly API bill entered
$420.00
API cost per paying customer
$3.50
Share of subscription price
12.07%
Price left after API cost
$25.50

USD. The amount left is before payment fees, hosting, and your other costs.

See what your providers billed

Connect OpenAI or Anthropic in RealMRR to import actual API spend by project or workspace and see it alongside your product’s revenue.

Track my actual API spend
Monthly API bill entered: $420.00.

How to calculate LLM costs

A monthly API bill tells you how much a provider charged. Divide it by the customers paying for the product and you can see how large that cost is relative to what each customer pays. The same calculation works with a token estimate if you're testing a plan you haven't launched. This LLM cost calculator accepts both starting points and keeps the full result available without a sign-up.

Start with a bill if you have one

Choose Actual monthly API bill and enter the amount for the product and period you're measuring. Start with a completed month so the number doesn't change as late usage appears. If the product uses OpenAI and Claude, add the charges from both providers in USD before entering the total. Keep the underlying breakdown somewhere you can refer to it when the total moves.

If several products share an organization, take the costs for the relevant OpenAI projects or Claude workspaces. A bill covering three products will overstate the cost of one product if you assign the full amount to it. When a shared item cannot be traced directly, choose an allocation based on the source of the work, such as metered tokens for that model or the number of jobs that generated it. Describe the split in your notes so a later month uses the same method.

Decide whether you're measuring what you paid or what the workload normally costs. A month with a large promotional credit can be useful for cash planning. To test if a plan can support itself at ordinary rates, use spend before that unusual credit or run a second scenario with standard pricing. Similarly, a prepaid credit purchase can land in one month and fund work over several months. Use your provider's usage and cost report to find the part that belongs to the month you are measuring.

Match the customer count to the cost

Enter the number of paying customers for the same product and month. Use paid accounts if each account buys a plan, even when a plan includes multiple seats. If you charge per seat and are testing what one seat contributes, use billed seats and the price per seat. Mixing accounts and seats makes the cost per customer hard to compare between plans or months.

If you want to know how much of the subscription price the API bill consumes, enter your monthly price per customer. When customers pay different prices, divide monthly subscription revenue for the same group by the paying customer count and enter that average. Use revenue for the service period. A $348 annual plan contributes $29 per month before refunds or discounts for a simple normalized comparison. Using the entire annual receipt as one month's plan price makes the monthly cost look smaller than it is.

The result includes all API spending that went into the bill, including trial users if they share that budget. Dividing it by paying users shows how much API spend each paid relationship needs to support on average. To see the cost of serving paid customers alone, isolate their usage first. A customer count of zero leaves cost per customer unavailable. A blank or zero subscription price leaves the price comparison unavailable. You can still calculate monthly API spend in either case.

Worked example from a $420 bill

A fictional SaaS pays $420 for one month of API usage and serves 120 paying customers on a $29 monthly plan. Divide $420 by 120 to get $3.50 per paying customer. Divide $3.50 by $29 to get 12.07% of the subscription price. The remaining amount is $25.50 per customer before payment fees, hosting, support and other costs. Those are the figures shown when you load the example.

A cost of $3.50 per account is an average across the whole product. One account might use $0.60 while a customer running long reports uses $18. The calculator cannot tell them apart from the bill alone. Use the average to review whether the product can cover its API spend. If you're setting a limit or testing a tier, look at several heavy users and run those figures alongside the average. An average can stay stable when two very different usage patterns cancel each other out.

If the same $420 bill rises to $4,200 with the same customer count and price, API spend alone comes to $35 per paying customer. The result leaves negative $6 of the plan price before other expenses. That says the pricing or usage in this scenario needs work. To test how many jobs a plan can include or what a top-up must cover, use the AI SaaS pricing worksheet.

Estimate from OpenAI or Claude tokens

Choose Token usage estimate when you're forecasting a month or checking how a workload could have produced a bill. The form uses millions of tokens, so 250,000 tokens go in as 0.25, 12 million as 12, and 1,000 as 0.001. If all you have is a typical request, multiply each token count per request by the number of requests you expect in the month and divide by one million. Count every billable call behind a customer action, including retries and calls to a second model.

Check how your provider reports caching. Enter only the plain uncached input in Uncached input. If the usage report's total already includes tokens that were served from a cache, subtract those reads before entering the plain input. Use Cache writes for tokens that went into a cache at a separate write rate. For example, if a report shows 10 million input tokens including 3 million reads and 1 million separately charged writes, enter 6 million uncached input, 3 million reads, and 1 million writes. Some reports already separate these categories, in which case copy the separate totals.

The tool multiplies each token count in millions by its USD rate per million and adds the four results. With the sample token inputs, 100 million uncached input tokens at $2 per million cost $200. Twenty million output tokens at $10 per million cost $200. Fifty million cache reads at $0.10 per million cost $5. Six million cache writes at $2.50 per million cost $15. The estimate is $420, matching the bill example. The example assumes one model, one text pricing tier, and the cache-write duration shown next to that preset.

Pick a rate that matches how you run the model

The two presets use standard text rates for OpenAI GPT-6.2 Sol and Claude Sonnet 5.5, checked on December 2, 2026. The OpenAI preset assumes 30-minute cache writes and the Claude preset assumes five-minute writes. Both use $2 per million uncached input tokens, $10 per million output tokens, $0.10 per million cache reads, and $2.50 per million cache writes under those assumptions. The rates are editable. Check the OpenAI API pricing documentation and Claude pricing documentation for your model and service tier.

If your contract uses different prices, enter them directly. The price per million in a provider table can vary by model version, context length, processing speed and region. Batch jobs may have a different rate from interactive calls. Long cache retention can cost more to write. Run separate estimates for workloads with different rates and add their monthly dollar totals. Use the combined total in bill mode if you want to see what they cost per customer together. Keep the same customer count across runs when the same customers use both workloads.

A text estimate covers the token categories in the form. A provider invoice can also include images, audio, storage, web search, hosted tools, and other charges with different billing units. It can reflect taxes, discounts and currency conversion. For a forecast, add those items from the provider's price sheet or from a representative invoice. For an actual month, use the bill mode and include the charges you intend to measure.

Check the workload before you change the plan

A useful forecast starts with a completed customer action, such as a report, support answer or document review. Look at a small sample of real runs. Count the messages sent on each turn, including system instructions, retrieved content and previous model replies when the application sends them again. An output can include billed reasoning tokens in addition to the words a customer sees. Use the provider's usage counters where you have them. A count taken from the visible text can miss a large part of the work.

Then run a normal month and a heavier month with the same price. Change one assumption at a time so you can read the difference. If the estimate moves mostly with output, shorter responses or fewer repeat calls may matter more than a discount on input. If a few customers send unusually long documents, a separate allowance for that workload may explain more than a change in the average plan price. Compare both scenarios with what you know about how people use the product.

Turn the result into a monthly check

Start by recording the period, the product, the provider costs you included and the customer count you used. Compare this month's estimate with the closed bill when it arrives. If they diverge, look first for a change in requests, model mix, cache behavior, or charges billed outside the token rates. Add payment fees, hosting and other expenses in the SaaS Revenue Calculator when you want to see how much the whole product keeps.

RealMRR can import actual OpenAI costs by project and Claude API costs by workspace. If your model providers use a shared account, assign the relevant project or workspace costs to the right product, then look at them next to its payment revenue. Use the provider totals to keep the monthly figure current. For a per-customer breakdown, keep metering at the application level, where each request can be attributed to the account that generated it.