Two formulas cover most of it.
Rerank cost per query = (N / 1,000) x P, where N is the number of candidate documents you score and P is the reranker price per 1,000 documents.
Context cost saved per query = (K_large - K_small) x T x C, where K_large is the cap you would need without a reranker, K_small is the cap you keep with one, T is average tokens per retained row, and C is the generator's input token price.
The decision rule: if rerank cost per query is less than context cost saved per query, the reranker pays for itself. If it is more, raise the cap instead.
A third term is worth tracking: latency. Real reranker comparisons report median latency alongside score and cost, for example 0.18 seconds for one reranker and 0.28 for another on the same 50-candidate setup Kapa's reranker benchmark. Reranker latency is a line item, not a rounding error, especially in voice or interactive search.
Worked example 1: short factoid support queries
Suppose you retrieve N = 50 candidates, keep k = 5, and the reranker is priced at $2.00 per 1,000 documents scored. That is 50/1,000 x $2.00 = $0.10 per query.
Now suppose the no-reranker alternative needs a cap of 20 rows to hit the same answer quality. Each row of a short FAQ chunk is about 150 tokens, and the generator charges $0.50 per million input tokens. Saved tokens per query are (20 - 5) x 150 = 2,250. Saved cost is 2,250 / 1,000,000 x $0.50 = $0.001125.
Reranking costs $0.10 to save $0.001. That is roughly 89 times more expensive than the tokens it removes. Raise the cap. For short chunks, the reranker cannot pay for itself on token savings alone.
Worked example 2: long document or code queries
Same N = 50, same $2.00 per 1,000 documents, so rerank cost is still $0.10. But each row here is a 2,000-token code or contract section, and the generator charges $3.00 per million input tokens, which is realistic for larger frontier models.
Saved tokens: (20 - 5) x 2,000 = 30,000. Saved cost: 30,000 / 1,000,000 x $3.00 = $0.09 per query.
Still not quite break-even. Now change one assumption honestly: to reach the same quality without a reranker, you need a cap of 30, not 20, because so many candidates are near-duplicates. Saved tokens become (30 - 5) x 2,000 = 50,000, and saved cost is $0.15 per query. The reranker now nets $0.05 per query before latency.
That is the shape of the answer. Reranking pays when rows are long, when the larger cap must grow disproportionately to compensate, or both.
| Variable | Factoid support query | Long code or contract query |
|---|
| Candidates scored (N) | 50 | 50 |
| Cap with reranker (k) | 5 | 5 |
| Cap needed without reranker | 20 | 30 |
| Average tokens per row | 150 | 2,000 |
| Generator input price per 1M tokens | $0.50 | $3.00 |
| Rerank cost per query | $0.10 | $0.10 |
| Tokens saved per query | 2,250 | 50,000 |
| Context cost saved per query | $0.0011 | $0.15 |
| Verdict | Raise the cap | Rerank |
The two examples are the decision rule in miniature, and the table is the artifact to hand to whoever owns the budget.