CalcWorldHub
Free online calculator · no signup

Balanced accuracy calculator

Average the classifier’s sensitivity and specificity so each binary class contributes equally.

A better way to figure it out
Simple
inputs.
Clear result · useful details
Example · balanced accuracy87.6819% ↗

Calculator

4,000 tools
Balanced accuracy calculator — True positives (TP), False positives (FP), False negatives (FN) and calculation method
Balanced accuracy calculator: inputs and calculation method.

How to use this calculator

Calculate binary balanced accuracy as the mean of sensitivity and specificity from a confusion matrix.

  1. 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.
  2. Read the worked example below to check the expected input format and result.
  3. 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

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.

Binary confusion matrix used for balanced accuracySensitivity is true positives divided by true positives plus false negatives; specificity is true negatives divided by true negatives plus false positives. Balanced accuracy is their average.PredictedPositiveNegativeActual +Actual −TPFNFPTNSensitivity = TP / (TP + FN)Specificity = TN / (TN + FP); average the two
Both class recalls receive equal weight in binary balanced accuracy.

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.

✓ Results update instantly
✓ No account required
✓ Privacy-friendly by design
✓ US and metric units