Confusion Matrix Heatmap Calculator

Create detailed confusion matrix heatmaps, explore every class, compare models, adjust thresholds, identify prediction errors, and export clear classification reports instantly online with ease.

Changes are saved locally.

Results will appear here

Load the example or enter classification data, then select Calculate.

Model Summary

Confusion Matrix Heatmap

diagonal cells are correct predictions; off-diagonal cells are errors.
Select a heatmap cell to inspect its value.

Matrix Values

Per-Class Metrics

Binary Classification Metrics

Misclassification Analysis

Observation-Level Data

Model Comparison

Automatic Interpretation

Calculator Inputs

Use commas, spaces, tabs, semicolons, or new lines.
The number of predicted labels must match actual labels.
Enter probability data to evaluate threshold performance.

Formula Used

Accuracy
(TP + TN) ÷ (TP + TN + FP + FN)
Precision
TP ÷ (TP + FP)
Recall
TP ÷ (TP + FN)
Specificity
TN ÷ (TN + FP)
F1 Score
2 × Precision × Recall ÷ (Precision + Recall)
Balanced Accuracy
Average recall across all classes
Cohen’s Kappa
(Observed accuracy − Expected accuracy) ÷ (1 − Expected accuracy)
Multiclass MCC
Correlation-style score derived from the complete confusion matrix

How to Use

  1. Enter actual and predicted labels, upload CSV data, or build a manual matrix.
  2. Select normalization, palette, scaling, decimal precision, and positive class options.
  3. Choose Calculate Heatmap to generate the matrix and performance metrics.
  4. Inspect cells, filter observations, compare snapshots, and export your results.

Example Data

ObservationActualPredicted
1CatCat
2DogCat
3BirdBird
4CatDog
5DogDog

Frequently Asked Questions

What does the diagonal represent?

Diagonal cells contain correct predictions for each class.

What are off-diagonal cells?

They show one class being incorrectly predicted as another.

When should I normalize by rows?

Row normalization compares prediction behavior within each actual class.

When should I normalize by columns?

Column normalization examines the composition of each predicted class.

Why can a metric be undefined?

Its denominator may be zero because a class lacks observations or predictions.

Does high accuracy prove model quality?

No. Class imbalance can make accuracy look stronger than practical performance.

Which average should I use?

Macro treats classes equally, weighted uses support, and micro pools all decisions.

Can I compare models?

Yes. Save snapshots and review differences in the comparison table.

Is uploaded data stored?

No. Calculations run locally in your browser.

Can I use text class labels?

Yes. Numeric, text, and mixed labels are supported.

Related Calculators

Precision-Recall CurveCumulative Gain ChartLift ChartCalibration CurveDecision Boundary PlotProbability Distribution PlotThreshold Performance PlotClass Distribution ChartMulticlass ROC CurveError Analysis Bar Chart

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.