# LLM cost calculator for your AI SaaS.

Choose a model priced by OpenRouter and estimate text-token spend per prompt or per month — free, no sign-up. No prompt text is uploaded.

Page: https://saascode.ai/tools/llm-cost-calculator

## How to use

1. Load live prices from the public OpenRouter models API; inspect its retrieval timestamp.
2. Search a model and enter your billed input and output token counts and request volume.
3. Calculate text-token cost. Check additional model charges and provider routing before treating it as a budget.

## Scope

Public model-list GET only; no inference calls and no prompt uploads. Prices are USD per token from OpenRouter, cached one hour with retrieval time. Text-token estimate, not a provider quote.

## References

- [OpenRouter public models API](https://openrouter.ai/api/v1/models)
- [OpenRouter model fields and pricing](https://openrouter.ai/docs/guides/overview/models)

## Build your SaaS

[Explore SaaS products for your AI idea](https://saascode.ai/products)

## Related tools

- [SaaS SWOT analysis generator](https://saascode.ai/tools/swot-analysis-generator)
- [SaaS development cost calculator](https://saascode.ai/tools/saas-development-cost-calculator)
- [SaaS idea generator](https://saascode.ai/tools/saas-idea-generator)
- [All free tools](https://saascode.ai/tools)

## FAQ

### Are the model prices hardcoded?

No. The browser reads the public OpenRouter /api/v1/models response without a key. Only valid non-negative prompt and completion prices are offered. Unknown or dynamic token rates are excluded.

### What does the cache contain?

Only public model names, IDs, prices and the fetch timestamp, cached locally for one hour. Inputs and results are not cached. A refresh bypasses the cache. If refresh fails, any loaded snapshot is clearly identified by its date and the error.

### What if OpenRouter cannot be reached?

The tool states the API error and offers Retry live prices. No fallback prices are invented. A previously loaded snapshot, if present, remains explicitly dated and is labeled as not refreshed.

### Do you count tokens from pasted prompts?

No prompt text is requested. Enter counts from your model tokenizer or usage response. Include system messages, conversation history and tool definitions; text length is not an exact token count.

### Are images, audio, search and reasoning included?

No. This estimates input and output text tokens only. Other returned pricing fields are shown in the result for inspection but not added. Model reasoning, cache behavior, routing, discounts and extra modalities can change your bill.

### Is the model list free to load?

The public model list requires no API key and does not perform inference. Tool inputs stay local. Only the model-list GET goes to OpenRouter; analytics record a fixed tool ID and action.
