ToolJoltTools

Precision@K & Recall@K Calculator

Top-K ranking quality for search, recommendations and RAG retrieval — relevance of the results you actually show.

Precision@K (%)
Recall@K (%)
Relevant in top-K

Precision@K is what users feel — the relevance of page-one results. Recall@K matters when finding ALL relevant items is the goal (legal discovery, RAG coverage). They trade off as K changes: bigger K usually raises recall but lowers precision.

Formula

Precision@K = relevant in top-K ÷ K · Recall@K = relevant in top-K ÷ total relevant
References: Manning, Raghavan & Schütze (2008), Introduction to Information Retrieval, Ch. 8

Disclaimer: This tool is for general informational and estimation purposes only and is not professional financial, tax, accounting or legal advice. All figures are estimates — verify with a qualified professional before making decisions. Read the full disclaimer.

About Precision@K & Recall@K Calculator

Search results, recommendation feeds and RAG retrievers all live or die by what's in the top few results — nobody scrolls to result fifty. Precision@K measures the relevance of the K results you actually show; Recall@K measures how many of all the relevant items you managed to surface in that window. This calculator computes both from a ranked relevance list, making the central ranking trade-off concrete: push K up and you usually catch more relevant items (recall rises) but dilute the top with noise (precision falls).

How to use Precision@K & Recall@K Calculator

  1. 1Enter your values into Precision@K & Recall@K Calculator — sensible, domain-typical defaults are pre-filled so you see a real result immediately.
  2. 2The result recomputes live using the formula shown on the page; there is no button to press.
  3. 3Adjust any input to compare scenarios, then read the worked example to see the substituted numbers.

Why use Precision@K & Recall@K Calculator?

  • Computes Precision@K & Recall@K instantly in your browser — no sign-up, no upload, no server round-trip.
  • 100% free and unlimited, with the exact formula shown: Precision@K = relevant in top-K ÷ K.
  • Runs entirely client-side, so every value you enter stays private on your device.
  • Live recompute as you type, with a worked example and authoritative references for trust.

Frequently asked questions

Precision@K or Recall@K — which matters for my use case?+

Precision@K for user-facing ranking where the top results are all anyone sees (web search, product recommendations) — relevance of what's shown is everything. Recall@K when missing any relevant item is costly and users will dig (legal e-discovery, medical literature search, RAG where the answer might be in any chunk you retrieve).

How do I choose K?+

Match it to how many results actually get consumed: K=10 for a search results page, K=3–8 for RAG chunks fed to an LLM, K=1 for 'I'm feeling lucky' single-answer systems. Report at the K your product genuinely uses; metrics at K=100 are meaningless if users see ten.

Why don't precision@K and recall@K consider ranking order within K?+

They don't — a relevant item at position 1 and position K count equally. That's their limitation. When order within the top-K matters (it usually does), use MAP, MRR or NDCG, which reward putting relevant items higher. Precision@K is the simple first cut; rank-aware metrics are the refinement.

What is the F1@K?+

The harmonic mean of precision@K and recall@K, giving a single balanced number at a cutoff. It's useful when you want one figure but both surfacing relevant items and not wasting slots matter. As with all F-scores, it hides which of the two is the weak link — check them individually too.

Related tools

Related ML & AI tools

Sponsored