Balanced accuracy calculator
Average the classifier’s sensitivity and specificity so each binary class contributes equally.
inputs.
Calculator
How to use this calculator
Calculate binary balanced accuracy as the mean of sensitivity and specificity from a confusion matrix.
- Enter True positives (TP), False positives (FP), False negatives (FN), True negatives (TN). Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Give each binary class equal weight in accuracy
Balanced accuracy averages the true-positive rate and true-negative rate. Unlike raw accuracy, it gives the positive and negative classes equal weight even when their sample sizes differ.
Inputs and units
- True positives (TP): Positive cases correctly identified.
- False positives (FP): Negative cases incorrectly labeled positive.
- False negatives (FN): Positive cases missed by the classifier.
- True negatives (TN): Negative cases correctly identified.
Formula and method
Sensitivity = TP/(TP+FN); specificity = TN/(TN+FP). Binary balanced accuracy = (sensitivity + specificity)/2. The displayed percentage multiplies this mean by 100.
Worked example
For TP = 42, FN = 10, TN = 140, and FP = 8, sensitivity = 42/52 ≈ 0.80769 and specificity = 140/148 ≈ 0.94595. Their mean is about 0.87682, or 87.6819% with the calculator’s rounding.
Interpreting the result
The score averages class-wise recall; here the two classes contribute equally despite different totals. It is a threshold-specific summary and does not show precision, calibration, prevalence, or the costs of different errors.
Assumptions and limits
Use nonnegative integer counts from one binary confusion matrix. Both actual classes must be represented so that TP+FN and TN+FP are positive. The multiclass definition can differ by averaging convention.
Method references
Frequently asked questions
Can balanced accuracy replace precision or F1?
No. It averages sensitivity and specificity. Precision and F1 answer different questions about the positive predictions and should be selected for the application’s error costs.
How do I use the Balanced accuracy calculator?
Enter True positives (TP), False positives (FP), False negatives (FN), True negatives (TN). Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Balanced accuracy?
For TP = 42, FN = 10, TN = 140, and FP = 8, sensitivity = 42/52 ≈ 0.80769 and specificity = 140/148 ≈ 0.94595. Their mean is about 0.87682, or 87.6819% with the calculator’s rounding.
What does the Balanced accuracy calculator calculate?
Calculate binary balanced accuracy as the mean of sensitivity and specificity from a confusion matrix.
What assumptions apply to Balanced accuracy?
Use nonnegative integer counts from one binary confusion matrix. Both actual classes must be represented so that TP+FN and TN+FP are positive. The multiclass definition can differ by averaging convention.
Good calculators show their work.
CalcWorldHub is built around clear inputs and visible assumptions. Results are estimates for planning; check official sources or your provider’s terms when exact figures matter.