Calculation Result
Example result uses TN = 90 and FP = 10.
Specificity = TN ÷ (TN + FP)Specificity = 90.0000 ÷ (90.0000 + 10.0000) = 0.9000
Good: The model controls false positives well.
Threshold Analysis
Compare thresholds, inspect the sensitivity-specificity trade-off, and locate the highest Youden’s J value.
| Threshold | Specificity | Sensitivity | FPR | Youden’s J | TN | FP |
|---|
Multiclass One-vs-Rest Specificity
Build a square confusion matrix. Each class becomes positive while all remaining classes become negative.
| Class | TN | FP | TP | FN | Specificity | Weight |
|---|---|---|---|---|---|---|
| Macro Average | — | Equal | ||||
| Weighted Average | — | Support | ||||
| Micro Aggregate | — | Pooled one-vs-rest counts | ||||
Micro averaging in multiclass one-vs-rest pools duplicated negative decisions. Interpret it with care.
Batch Model Comparison
Paste one model per line using Model, TN, FP, TP, FN. TP and FN may be zero.
| Model | Specificity | FPR | Sensitivity | Balanced Accuracy | Youden’s J |
|---|
Formula Used
Specificity = True Negatives ÷ (True Negatives + False Positives)Specificity measures correct rejection of actual negative cases. It is also called the true negative rate. Higher values indicate fewer false positive decisions.
How to Use
- Select the calculation mode matching your available data.
- Enter confusion counts, paired labels, or probabilities.
- Choose precision and submit the main calculator.
- Review specificity, related metrics, formula steps, and interpretation.
- Use threshold, multiclass, or batch tools when needed.
- Copy, print, or export the completed analysis.
Example Data
| Measure | Value | Meaning |
|---|---|---|
| True Negatives | 90 | Ninety negative cases were rejected correctly. |
| False Positives | 10 | Ten negative cases were classified positive. |
| Specificity | 90% | The model correctly rejects nine of ten negatives. |
| False Positive Rate | 10% | One of ten negatives becomes a false alarm. |
Metric Guide
| Metric | Formula | Purpose |
|---|---|---|
| Specificity | TN / (TN + FP) | Measures negative-class rejection. |
| Sensitivity | TP / (TP + FN) | Measures positive-class detection. |
| Precision | TP / (TP + FP) | Measures positive prediction reliability. |
| Negative Predictive Value | TN / (TN + FN) | Measures negative prediction reliability. |
| Balanced Accuracy | (Sensitivity + Specificity) / 2 | Balances both classes. |
| Youden’s J | Sensitivity + Specificity − 1 | Supports threshold selection. |
| MCC | Correlation from all four counts | Summarizes binary classification quality. |
Export Preview
Specificity Calculator Specificity: 90.0000%TN: 90.0000FP: 10.0000
Frequently Asked Questions
What does specificity measure?
Specificity measures how often actual negatives are predicted negative. It focuses only on negative cases. Higher specificity means fewer false alarms.
Is specificity the same as precision?
No. Specificity starts with actual negative cases. Precision starts with predicted positive cases.
What is a good specificity score?
The required score depends on application risk. Some screening systems accept lower specificity. High-cost false alarms usually require stronger specificity.
Can specificity equal one hundred percent?
Yes. This happens when false positives equal zero. Actual negative cases must still exist.
Why is specificity undefined sometimes?
Specificity needs actual negative observations. TN plus FP must exceed zero. Otherwise, the denominator becomes zero.
How does threshold affect specificity?
A higher positive threshold usually increases specificity. Fewer cases receive positive predictions. Sensitivity may decrease at the same time.
How is multiclass specificity calculated?
Each class is compared against all remaining classes. This creates one-vs-rest counts. The calculator then reports per-class specificity.
Should I use macro or weighted averaging?
Macro averaging treats every class equally. Weighted averaging reflects class support. Use both when class imbalance matters.
Can weighted sample counts be entered?
Yes. Decimal counts are accepted. They can represent weighted observations or aggregated sample mass.