OpenRouter Cost Calculator

Estimate routed AI request costs from user-entered token prices, request volume, and markup.

Save

Inputs

tokens/request
tokens/request
requests
%

Your values stay on this device.

Results

Total Cost

Base token cost plus routing fee.

Base Cost$30.00
Routing Fee$0.00
Effective Cost Per Request$0.00

Report

Export and share

Document

Copy and share

Assumptions

  • Token prices are entered manually and treated as flat per-million-token rates.
  • Every request uses the same average input and output token counts.
  • Routing markup is applied to base token cost only.

Sensitivity preview

Input Tokens -10%: Total Cost $29.25

Input Tokens Current: Total Cost $30.00

Input Tokens +10%: Total Cost $30.75

Related Tools

View All

About this OpenRouter Cost Calculator

Routing through an AI gateway can make model selection easier, but teams still need a clear view of base token cost and any routing markup. This calculator keeps rates user-entered so it can match your selected model and account terms.

When to use it

  • Estimate a routed AI workload before launch.
  • Compare base model spend with routing overhead.
  • Price one-time evaluation jobs or production traffic.
  • Translate token rates into an effective cost per request.

How to use this calculator

  1. Enter average input and output tokens for one request.
  2. Enter the input and output token prices per million tokens.
  3. Add the total number of requests you want to estimate.
  4. Enter any routing markup percentage, or use 0 if none applies.

Key assumptions

  • Token prices are entered manually and treated as flat per-million-token rates.
  • Every request uses the same average input and output token counts.
  • Routing markup is applied to base token cost only.
  • The estimate excludes retries, caching, provider credits, taxes, storage, and non-token fees.

Dataset sources

OpenAI API pricing
Effective date
2026-05-05
Last reviewed
2026-05-05

Use the current provider pricing page or contract terms before making purchasing decisions.

Public provider pricing page; rates can change without notice.

Accuracy and testing

Review formula sources, default test cases, assumptions, unit handling, rounding rules, and changelog for this calculator.

View accuracy page

How this calculator works

Base cost is the per-request input and output token cost multiplied by request count. Routing fee is base cost multiplied by the markup percentage. Total cost is base cost plus routing fee.

Inputs explained

Input Tokens

Average number of tokens sent into the model per routed request.

Output Tokens

Average number of tokens generated by the model per routed request.

Input Price Per Million

Your manually entered input-token price for the selected model.

Output Price Per Million

Your manually entered output-token price for the selected model.

Request Count

Total routed requests included in the estimate.

Routing Markup Percent

Optional markup applied on top of base token cost. Use 0 when no markup applies.

Understanding your results

Total cost is the primary budget estimate. Base cost shows raw model token spend, routing fee isolates the markup amount, and effective cost per request helps compare routed and direct usage.

Example scenarios

Model Comparison

Estimate the same workload with two different user-entered price pairs to compare total routed cost.

Gateway Markup Check

Enter a markup percentage to see whether routing overhead is material at your expected request volume.

Key Features

  • Instant Calculation
  • Private & Secure
  • Mobile Optimized

Tips & Best Practices

  • Use 0% markup if your routing cost is already included in the token prices you enter.
  • Keep separate estimates for different models if your router switches between them.
  • Add a margin for retries or fallback routes when production traffic is unpredictable.
  • Use aggregate token counts instead of private prompt text.

Frequently Asked Questions

Are OpenRouter prices hardcoded here?
No. Enter the rates you want to model. This avoids stale pricing and supports different models, accounts, and routing setups.
What should I enter for routing markup?
Use the percentage fee you want to model. If no separate markup applies, enter 0.
What is effective cost per request?
It is total cost divided by request count, including the routing fee when one is entered.