2027 tool · Evidence checked 20 November 2026

Model Router Calculator: Cost, Quality and Latency

A router is only as good as its scoring. Enter up to four models with your own measured quality, p95 latency and blended cost, set the weights and hard filters, and see which model wins, by how much, and what the choice costs per month. Every number is editable and none of it is a benchmark.

Short answer. A model router sends each request to the cheapest model that still clears your quality and latency bar. Score each candidate on cost, quality and latency, weight the three criteria, and filter out models that miss a hard constraint. The highest weighted score wins; the margin tells you whether the decision is stable.

Three ways to route, and which one this tool scores

A router is a decision, not a product category. The simplest version is static: classification goes to a small model, contract review goes to a large one. It is easy to operate and easy to explain, but it ignores how hard an individual request is.

A cascade is dynamic: send the request to a cheap model, check confidence or a validator, and escalate to a stronger model when the check fails. Cascades can cut cost sharply, but they add a second call for every escalated request and a failure mode when the validator is wrong.

A weighted score is the third option, and the one this calculator implements. Each candidate gets a cost index, a quality score and a latency index. You set the weights and any hard floors. The highest score wins. This is transparent enough to defend in a design review and flexible enough to route by workload class rather than by one global rule.

If your only decision is how to split simple and complex requests across two price tiers, the workload router simulator is the lighter tool. This one adds quality floors, latency ceilings and a multi-criteria score.

Score four models

Costs, quality scores and latencies are yours. The defaults are illustrative round numbers, not vendor benchmarks. Nothing is sent to a server.

Model A

Model B

Model C

Model D

Enter at least two models to rank them.

The formula

Cost and latency are measured in different units, so both are converted to a 0-100 index across the eligible models. Quality arrives on the same scale. The weights then combine the three into one number.

  1. Filter first. Remove a model if it misses the quality floor, exceeds the latency ceiling, has a context window below the requirement, or has no cost entered.
  2. Cost index: (highest cost − model cost) ÷ (highest cost − lowest cost) × 100. The cheapest model scores 100, the most expensive 0.
  3. Latency index: (slowest p95 − model p95) ÷ (slowest p95 − fastest p95) × 100. The fastest model scores 100, the slowest 0.
  4. Quality score: your evaluation pass rate, 0-100, used without rescaling.
  5. Total: (cost weight × cost index + quality weight × quality + latency weight × latency index) ÷ sum of weights.
  6. Monthly cost: requests × tokens per request ÷ 1,000,000 × blended price. Used to show what the ranking costs, not to rank by itself.

If every eligible model has the same cost or the same latency, that index is set to 100 for all of them, so the criterion drops out instead of dividing by zero.

Worked example

The three candidates below are illustrative. The quality scores are invented round numbers; a real routing decision needs a measured evaluation set. The costs and latencies are not vendor benchmarks.

Three illustrative models scored at 50/30/20 weights
ModelCost $/1MQualityp95Cost indexLatency indexScoreMonthly cost
Model A$0.4062400 ms100.0100.088.6$228
Model B$2.5088900 ms72.450.072.6$1,425
Model C$8.00951,400 ms0.00.028.5$4,560

At the 50/30/20 weights, the cheap, fast model wins comfortably, and the expensive model's quality advantage cannot compensate. That is not a universal answer; it is a statement about this workload and these weights. Change the weights and the winner moves.

Same three models under four weight profiles
Weights (cost / quality / latency)Model AModel BModel CWinner
100 / 0 / 0100.072.40.0Model A
50 / 30 / 2088.672.628.5Model A
10 / 70 / 2073.478.866.5Model B
0 / 80 / 2069.680.476.0Model B

The flip happens at the 10/70/20 profile: once quality dominates, the mid-cost model overtakes the cheap one. The cost-only profile is a useful sanity check, because it shows the floor on spend, not the right answer. A router tuned only for cost will send work to a model that fails the job.

Hard filters change the answer more than weights do. A quality floor of 80 removes Model A entirely, and the tool then rescales the remaining candidates, so Model B rises to 96.4 against Model C at 28.5. That jump is a scale effect, not an improvement in Model B. A latency ceiling of 500 ms removes B and C, leaving only A. Neither result is a scoring problem; both are constraints doing their job, and both show why scores should be compared only within the same candidate set.

Where the numbers must come from

The calculator is honest only if the inputs are measured. Four rules keep it from becoming a spreadsheet that justifies a decision already made.

  • Quality: build an evaluation set of 50-200 prompts from real traffic, define a pass criterion a second reviewer can apply, and record the pass rate. Vendor benchmarks measure the benchmark's tasks. They are useful for shortlisting and useless for routing your refund policy.
  • Cost: use your net contracted rate, blended at your own input-output mix. If one model is flat-rate and another is metered, convert both to a cost per million at your volume before comparing; the cost calculator on this site does that arithmetic.
  • Latency: measure p95 from the region and network your users actually hit. Decide whether first token or last token matters. A streaming chat interface cares about first token; a batch classification job cares about the total.
  • Context: enter the smaller of the model's serving window and the plan's input ceiling. A plan ceiling can reduce a 262,144-token model to 64K, and the router must filter on the effective number.

Reading the result

The score is a preference index, not a quality measure. A model that scores 88.6 is not 16 points better in absolute quality than one that scores 72.6; it is a better fit for the weights you chose. Treat the gap, not the absolute number, as the signal.

When the top two are within about five points, the decision is inside the noise of your inputs. Use a tiebreaker that the score does not model: data residency, vendor concentration, contract length, migration cost or the availability of a fallback model. A router that flips on a one-point weight change is not stable enough to ship without a fallback.

Also compare the winner's monthly cost with the cheapest eligible option. If the winner costs several times more, the quality premium is a business decision, not a mathematical one. Write it down as such, with the evaluation evidence attached.

A minimal scoring function

The whole method fits in a few lines. This is the same arithmetic the page uses, without the interface.

python
def score(cost, quality, latency, costs, latencies, weights=(0.5, 0.3, 0.2)):
    lo, hi = min(costs), max(costs)
    cost_index = 100 if hi == lo else (hi - cost) / (hi - lo) * 100
    lo_l, hi_l = min(latencies), max(latencies)
    lat_index = 100 if hi_l == lo_l else (hi_l - latency) / (hi_l - lo_l) * 100
    return (weights[0] * cost_index + weights[1] * quality + weights[2] * lat_index) / sum(weights)

models = [
    {"id": "model-a", "cost": 0.40, "quality": 62, "p95": 400},
    {"id": "model-b", "cost": 2.50, "quality": 88, "p95": 900},
]
costs = [m["cost"] for m in models]
latencies = [m["p95"] for m in models]
for m in sorted(models, key=lambda m: score(m["cost"], m["quality"], m["p95"], costs, latencies), reverse=True):
    print(m["id"], round(score(m["cost"], m["quality"], m["p95"], costs, latencies), 1))

The labels in the example are generic stand-ins for your own model IDs, and the cost, quality and latency values represent your measurements. Do not copy them into production. Log the model that actually served each request, because a router is only auditable if the served model is recorded.

What the score does not model

  • Relative scaling. Min-max indices depend on the set you enter. Add a very expensive model and every other cost index rises; remove it and they fall. The ranking is only valid inside the set.
  • Error and retry cost. A cheap model that fails 8% of requests and triggers a retry is not cheap. Add the retry rate to the cost input, or model it separately.
  • Rate limits and queueing. A model that is fast at p95 but throttled at peak will route into a queue. The score has no concurrency term.
  • Evaluation noise. A 20-prompt evaluation cannot separate 70 from 75. Report confidence intervals, or treat small gaps as ties.
  • Lock-in and exit. The score says nothing about contract length, data portability or the cost of moving the workload later. Those belong in a vendor risk assessment.

Frequently asked questions

What is a model router?

A model router is the decision layer that chooses which model receives a request. Rules can be static (a model per workload), cascading (try a small model first and escalate on low confidence) or score-based (weight cost, quality and latency). The router returns a model ID to the client, and the client sends the request to that model.

How does this calculator score models?

Cost and latency are converted to 0-100 indices across the eligible models you enter: the cheapest and fastest models score 100, the most expensive and slowest score 0. Quality is the score you supply. The final score is the weighted average of the three, after any quality floor, latency ceiling or context filter has removed ineligible models.

Where should the quality scores come from?

From your own evaluation set, not from a vendor benchmark. Take 50 to 200 real prompts from production, define a pass criterion, and record the pass rate as a 0-100 score. A benchmark measures the benchmark's tasks and prompts; it does not measure your refund policy, your codebase or your customers' phrasing.

Why did the ranking change when I added a model?

Cost and latency indices are min-max scaled across the models you enter. Adding a very expensive or very slow model stretches the range and changes every other model's index, even though nothing about those models changed. Remove the outlier or judge the ranking within the set you actually intend to route between.

What happens when no model passes the filters?

The calculator reports each model's disqualifying reason instead of inventing a winner. The usual fixes are to lower the quality floor, relax the latency ceiling, reduce the context requirement, or add a model that can meet the constraint. A router that has no eligible model should fail closed, not silently downgrade.

Do I need multiple providers to route models?

No. Routing works inside a single catalogue, and one endpoint with one key is simpler to operate. Multiple providers add a second contract, a second failure mode and a second data path. A second provider is worth it when a hard requirement such as region, certification scope or model family cannot be met inside one catalogue.

Related pages

Route with one key, not five contracts

All 39 public model IDs sit behind one OpenAI-compatible endpoint, so a router only needs a model ID change.

Start Free → Read the docs

Sources

Routing research and latency guidance were checked on the pages below on 20 November 2026. The model scores on this page are illustrative inputs, not benchmarks.

Primary sources used for this tool
SourcePage checkedChecked
RouteLLMarxiv.org/abs/2406.18665 — learned routing between strong and weak models20 Nov 2026
FrugalGPTarxiv.org/abs/2305.05176 — cascade and scoring strategies for cost reduction20 Nov 2026
OpenAIplatform.openai.com/docs/guides/latency-optimization20 Nov 2026
Plugskyplugsky.com/models and plugsky.com/docs20 Nov 2026

Last checked 20 November 2026. A router is production code: test the rules against recorded traffic before you let them choose a model in production.