Calculator

RAG re-ranker cost calculator

Retrieve K candidates, score them with an LLM re-ranker (listwise or pointwise), then generate on top-N. Compare that path to stuffing all K chunks into the generator.

Retrieve → rerank → generate

Rerank pays for itself

$519.00saved

36.8% vs no-rerank · context shrink 75%

Without rerank$1,410.16
8,000 context tokens
With LLM rerank$891.16
2,000 context tokens
Delta−$519.00
Rerank cost$231.00
Rerank calls / query1
Gen savings$750.00

Pipeline

Retrieve → rerank → generate

Decision

With vs without delta

Query embed$0.16
Gen (no rerank)$1,410.00
Gen (with rerank)$660.00
Rerank spend$231.00
Net savings$519.00

Latency note: LLM rerank adds 1 extra model call per query before generation. Listwise is usually one round-trip; pointwise scales with K and can dominate p95 latency even when dollars look fine.

Dedicated cross-encoder rerank APIs may be cheaper than LLM listwise scoring—treat this as an LLM-rerank planning bound. Updated 2026-07-31. Approximate static list prices for planning only. Always verify against each provider’s official pricing page before production budgeting.

Guide

How to get value from this calculator

Compare RAG pipelines with and without an LLM or cross-encoder rerank step to see when reranking pays for itself through smaller, better top-K context. Reranking adds per-query cost but can reduce input tokens to the final generation call. Find the break-even point for your query volume and chunk count.

Cost formula

Without rerank: query cost = top-K × chunk tokens / 1M × gen input price + output cost; With rerank: query cost = rerank tokens / 1M × rerank price + top-K reduced × chunk tokens / 1M × gen input price + output cost; Savings when rerank cost < context token reduction value

Why it matters

Reranking is either a precision upgrade worth paying for or an extra tax that does not shrink context enough to matter. Without side-by-side cost math, teams add rerankers because benchmarks say so, not because unit economics work at their scale.

How to use it

  1. Enter retrieved candidate count before reranking and top-K sent to the generator after reranking.
  2. Set average tokens per chunk and generation output tokens.
  3. Add rerank model token cost per query (all candidates scored).
  4. Set monthly query volume.
  5. Compare the with/without delta on monthly total before adding a reranker.
  6. Validate quality improvement from reranking justifies any added cost in evals.

Planning tips

  • Reranking pays off when it lets you cut top-K from 20 to 5 with equal or better quality.
  • Trust the with/without delta—if savings are thin, skip rerank until quality evals demand it.
  • Cross-encoder rerankers may be cheaper than LLM rerank for high candidate counts.
  • Cache rerank results for repeated identical queries in support and FAQ apps.
  • Output token cost is unchanged by reranking—savings are on generation input context.
  • Measure retrieval precision@K before and after rerank to confirm you can safely lower K.

Frequently asked questions

When is reranking not worth it?

When candidate pools are small, embeddings already rank well, or rerank cost exceeds the input savings from a smaller top-K. This calculator shows the break-even for your numbers.

Are rerank model prices official?

CentsPerToken uses approximate list prices for planning. Verify reranker and generator model rates on provider pricing pages.

Does this include embedding and indexing cost?

No. This compares query-time rerank vs no-rerank paths. Use the embedding RAG calculator for full pipeline costing.

Should I rerank with the same model used for generation?

Not required. A smaller rerank model is common. Enter the rerank model's pricing separately from the generator.