Data Science Calculators

Confusion Matrix Calculator

Calculate accuracy, precision, recall, specificity, and F1 score from true/false positive and negative counts in a binary classifier.

Correlation Coefficient Calculator

Calculate the Pearson correlation coefficient (r) between two sets of numeric values to measure linear relationship strength.

Cosine Similarity Calculator

Calculate cosine similarity and the angle between two numeric vectors using the dot product and vector magnitude formula.

Data Sample Size Calculator

Calculate required survey sample size from confidence level, margin of error, and population size using Cochran's formula.

Euclidean Distance Calculator

Calculate straight-line Euclidean distance between two points of any dimension using the generalized Pythagorean formula.

F1 Score Calculator

Calculate F1 score as the harmonic mean of precision and recall, either from percentages directly or from confusion matrix counts.

Feature Scaling Calculator

Scale a list of values using min-max normalization or z-score standardization, the two standard feature scaling methods.

Jaccard Similarity Calculator

Calculate the Jaccard similarity coefficient between two sets of items by comparing their intersection to their union.

Learning Rate Decay Calculator

Calculate the decayed learning rate at a given training epoch using the inverse time decay schedule formula.

Manhattan Distance Calculator

Calculate the Manhattan (L1) distance between two points of any dimensionality, comma-separated.

Mean Squared Error Calculator

Calculate mean squared error, RMSE, and MAE between actual and predicted value lists to evaluate regression model accuracy.

One-Hot Encoding Dimension Calculator

Calculate how many new columns one-hot encoding will create from your categorical features, with and without drop-first encoding.

Perplexity Calculator (Language Models)

Calculate perplexity from a cross-entropy loss value, a standard metric for evaluating language model prediction quality.

Precision Recall Calculator

Calculate precision and recall from true positive, false positive, and false negative counts using the standard classification formulas.

R-Squared Calculator

Calculate R-squared from actual and predicted value lists to see what fraction of variance a regression model explains.

ROC AUC Calculator

Calculate ROC AUC from positive and negative class scores using the Mann-Whitney rank-sum method, with an interpretation scale.

Shannon Entropy Calculator

Calculate Shannon entropy in bits from a probability distribution, measuring the average uncertainty of outcomes.

Silhouette Score Calculator

Calculate a silhouette score from mean intra-cluster and nearest-cluster distances to evaluate clustering quality.

Train/Test Split Calculator

Calculate the number of training and test samples from a total dataset size and a chosen test size percentage.

Z-Score Calculator

Calculate a Z-score (standard score) from a value, mean, and standard deviation, with an outlier assessment.

Judging a Model by the Right Number

A machine learning model's raw accuracy can be dangerously misleading, especially when the thing you are trying to detect is rare. These ten calculators cover the evaluation metrics data scientists use to judge a model honestly.

Why Accuracy Alone Can Lie to You

Take a rare-condition screening test applied to 1,000 people, where only 50 (5%) actually have the condition. Suppose the model flags 130 people as positive: 40 of those are correctly identified (true positives) and 90 are false alarms (false positives), while 10 real cases are missed (false negatives).

Evaluating a model on 1,000 samples, 50 true positive cases
MetricCalculationResult
Accuracy(40 correct + 850 correctly-rejected) ÷ 100089%
Precision40 ÷ (40+90)30.8%
Recall40 ÷ (40+10)80%
F1 ScoreHarmonic mean of precision and recall44.6%

The 89% accuracy figure looks great, but precision reveals that most of the model's positive flags are actually false alarms — exactly the kind of gap the Precision Recall Calculator and F1 Score Calculator are built to expose.

Popular Data Science Calculators

  • Confusion Matrix Calculator — organizes true/false positive and negative counts into the standard evaluation matrix.
  • R-Squared Calculator — measures how much of a dependent variable's variance a regression model explains.
  • Cosine Similarity Calculator — measures directional similarity between two vectors, common in text and recommendation systems.

Need broader statistical tools? See the Statistics Calculators, or check the underlying linear algebra in Math Calculators.