Precision Calculator
Calculate the Precision metric from True Positive and False Positive counts instantly, with percentage conversion, performance rating, and downloadable reports. Free and browser-based.
Precision Calculator
Precision = TP ÷ (TP + FP)
Inputs
Precision
Enter True Positive and False Positive values on the left to calculate precision.
Performance Rating Guide
Export & Share
What Is a Precision Calculator?
A precision calculator is a free browser-based tool that computes the Precision metric used to evaluate classification models in machine learning, information retrieval, medical diagnostics, and fraud detection. It answers a core question every model evaluator asks: of everything my model flagged as positive, how much did it actually get right?
Precision is easy to define but easy to misinterpret without context — a high precision alone doesn't tell you how many real positives were missed (that's recall's job). This calculator takes your True Positive and False Positive counts and instantly returns the precision score, its percentage, a performance rating, and the full formula substitution.
This tool is built for machine learning engineers, data scientists, AI researchers, students, teachers, software engineers, healthcare analysts, fraud detection teams, and business intelligence analysts. It supports adjustable decimal precision, decimal/percentage/both output formats, shareable calculation URLs, and CSV/TXT/JSON export — running entirely in your browser.
How the Precision Calculator Works
The calculator divides your True Positive count by the sum of True Positive and False Positive, then converts the result to a percentage and a plain-language performance rating.
Core Formula
Precision = TP ÷ (TP + FP)
Precision % = Precision × 100
- →True Positive (TP): The number of cases your model correctly predicted as positive — a correctly caught spam email, a correctly flagged fraudulent transaction, a correctly diagnosed condition.
- →False Positive (FP): The number of cases your model incorrectly predicted as positive — a legitimate email wrongly flagged as spam, a valid transaction wrongly flagged as fraud.
- →Division by Zero Handling: If both TP and FP are zero, the calculator clearly explains that precision can't be computed, since your model made no positive predictions at all.
- →Performance Rating: The percentage result is automatically classified from Needs Improvement to Excellent, giving instant context to the raw number.
How to Use the Precision Calculator
Step-by-Step Guide
- 1Enter True Positive Count: Type the number of correct positive predictions your model made, based on your confusion matrix or evaluation results.
- 2Enter False Positive Count: Type the number of incorrect positive predictions — cases your model flagged as positive that were actually negative.
- 3Choose an Output Format: Select Decimal, Percentage, or Both depending on how you need to report the result.
- 4Adjust Decimal Precision: Choose how many decimal places to display, from 0 to 5, to match the precision your reporting requires.
- 5Review the Live Result: The precision score, percentage, performance rating, and full calculation steps update instantly as you type.
- 6Copy, Export, or Share: Copy the full report, download it as CSV, TXT, or JSON, print it, or copy a shareable URL with your inputs encoded.
Key Features
- ✓Instant precision calculation with a 150ms debounce as you type
- ✓Decimal, percentage, or both output formats
- ✓Automatic performance rating from Needs Improvement to Excellent
- ✓Full formula breakdown with substituted values
- ✓Adjustable decimal precision from 0 to 5 places
- ✓Quick example presets for spam filtering, fraud detection, and medical screening
- ✓Clear division-by-zero handling with a plain-language explanation
- ✓Shareable calculation URL using query parameters
- ✓Export report as CSV, TXT, or JSON, plus a printable layout
- ✓Calculation history — save and reload up to 20 past results
- ✓All processing runs locally — no data leaves your browser
Real-World Use Cases
Evaluating a Spam Filter
An engineer tests a spam filter that correctly flagged 90 spam emails (TP) but wrongly flagged 10 legitimate emails as spam (FP). Precision = 90 ÷ 100 = 90%, rated Very High, meaning 9 out of 10 flagged emails are truly spam.
Assessing a Fraud Detection Model
A fraud team's model correctly identifies 250 fraudulent transactions (TP) but incorrectly flags 50 legitimate transactions as fraud (FP). Precision = 250 ÷ 300 ≈ 83.33%, rated High — reasonably reliable, but the false positives may still frustrate customers.
Medical Screening Test Accuracy
A healthcare analyst reviews a diagnostic test that correctly identified 15 true cases (TP) with 5 false alarms (FP). Precision = 15 ÷ 20 = 75%, rated Good, prompting a discussion about whether that false alarm rate is acceptable for the condition being screened.
Comparing Two Model Versions
A data scientist compares Model A (TP = 120, FP = 8, precision ≈ 93.75%) against Model B (TP = 135, FP = 25, precision ≈ 84.4%) to decide which version to deploy when minimizing false positives matters most.
Search Ranking Relevance Check
A search engineer evaluates how many of the top 100 results returned as "relevant" (TP + FP) were actually relevant (TP = 82, FP = 18), getting a precision of 82% to benchmark against a previous ranking algorithm.
Customer Churn Prediction Review
A business analyst checks a churn prediction model that flagged 60 customers as "at risk" (TP = 45, FP = 15), getting 75% precision — informing how much the retention team should trust each flagged customer before spending outreach budget.
Tips & Common Mistakes
Pro Tips
- 💡Always report precision alongside recall — a model can hit 100% precision by making only one very safe positive prediction, which tells you nothing about its overall usefulness.
- 💡Use the F1 score when you need a single number balancing both precision and recall, especially when your classes are imbalanced.
- 💡Set your decision threshold based on the real-world cost of a false positive versus a false negative for your specific use case, not a default 0.5 cutoff.
- 💡Track precision over time as you retrain your model — a sudden drop often signals data drift or a labeling issue in your training set.
- 💡When comparing two models, make sure you're evaluating both on the same test set and threshold, since precision is sensitive to both.
Common Mistakes to Avoid
- ✕Don't confuse precision with accuracy — accuracy considers all four confusion matrix cells (TP, TN, FP, FN), while precision only looks at predicted positives.
- ✕Don't optimize for precision alone on an imbalanced dataset — a model that rarely predicts positive can achieve high precision while missing most real positive cases (low recall).
- ✕Don't forget that precision says nothing about False Negatives — a model can have excellent precision and still miss the majority of true positive cases.
- ✕Don't compare precision scores across models evaluated on different test sets or different class distributions — the numbers aren't directly comparable.
- ✕Don't treat a single precision number as the full picture — always pair it with recall, and consider the real business cost of each type of error.
Precision Performance Rating Table
| Precision Range | Rating |
|---|---|
| 95% – 100% | Excellent |
| 90% – 94% | Very High |
| 80% – 89% | High |
| 70% – 79% | Good |
| 60% – 69% | Moderate |
| Below 60% | Needs Improvement |
* These ranges are general guidance. What counts as an acceptable precision score depends heavily on your specific application and the cost of a false positive.
Frequently Asked Questions
What is a precision calculator?
A precision calculator is a free browser-based tool that computes the Precision metric — the proportion of predicted positive results that are actually correct — from True Positive and False Positive counts, used to evaluate classification models.
How is precision calculated?
Precision equals True Positive divided by the sum of True Positive and False Positive: Precision = TP ÷ (TP + FP). For example, TP = 90 and FP = 10 gives a precision of 0.90, or 90%.
What is a good precision score?
95% and above is generally considered excellent, 90–94% very high, 80–89% high, and 70–79% good. What's actually acceptable depends on your application — high-stakes fields like medical diagnosis or fraud detection typically require higher precision.
What is the difference between precision and recall?
Precision measures how many predicted positives were actually correct (TP ÷ (TP + FP)). Recall measures how many actual positives were successfully found (TP ÷ (TP + FN)). A model can be high in one and low in the other, which is why both are usually reported together.
How do I calculate precision using this tool?
Enter your True Positive and False Positive counts, and the precision, percentage, and performance rating update instantly — no calculate button required, though one is available for accessibility.
What if my TP and FP are both zero?
The calculator shows a clear message that precision cannot be calculated, since dividing by TP + FP = 0 is undefined — this happens when your model made no positive predictions at all.
Can precision be used outside machine learning?
Yes. The same formula applies to search relevance, medical screening tests, quality control inspection, and any scenario evaluating how many flagged/predicted items were actually correct.
Why is my precision high but my model still performs poorly overall?
High precision alone doesn't guarantee good performance — your model might be missing many true positives (low recall) by only predicting positive when it's very confident. Always evaluate precision together with recall and, ideally, the F1 score.
Can I use this calculator for a full confusion matrix breakdown?
This calculator focuses specifically on Precision from TP and FP. For a complete evaluation including True Negative, False Negative, recall, F1 score, and accuracy, use the dedicated Confusion Matrix Analyzer or Recall Calculator.
Is my data private when using this calculator?
Yes. All calculations run entirely in your browser using JavaScript. Your input values are never transmitted to any server, stored in any database, or accessible to anyone other than you.
Who Uses This Calculator?
Machine Learning Engineers
Evaluate classification model performance during development and after retraining.
Data Scientists & AI Researchers
Report standardized precision metrics in experiments and published research.
Students & Teachers
Learn and teach the precision formula with instant, transparent calculations.
Software Engineers
Validate classifier output during QA before shipping a model to production.
Healthcare Analysts
Assess diagnostic test reliability by quantifying false-positive rates.
Fraud Detection Teams
Balance fraud catch rate against the cost of flagging legitimate transactions.
Related Tools
Recall Calculator
Calculate the Recall (Sensitivity) metric from True Positive and False Negative counts, with confusion matrix mode and performance rating.
F1 Score Calculator
Calculate the F1 Score from Precision and Recall, or directly from a confusion matrix (TP, FP, FN), with step-by-step breakdown and performance rating.
ROC AUC Calculator
Calculate the ROC curve and AUC score from binary classification results with an interactive curve, threshold explorer, and CSV upload.
Confusion Matrix Analyzer
Analyze binary and multi-class classification results with accuracy, precision, recall, F1, specificity, MCC, and a live confusion matrix heatmap.
P-Value Calculator
Calculate p-values and statistical significance for Z-tests, T-tests, Chi-Square tests, F-tests, and correlation tests instantly.
Correlation Coefficient Calculator
Calculate Pearson, Spearman, and Kendall correlation coefficients instantly with scatter plot visualization, regression line, outlier detection, and downloadable reports.