Machine Learning Calculators

Batch Size Calculator

Solve for the exact batch size needed to hit a target number of batches, or find how many optimizer steps a chosen batch size produces each epoch.

Class Imbalance Ratio Calculator

Calculate the class imbalance ratio in a classification dataset and get guidance on mitigation techniques.

CNN Receptive Field Calculator

Calculate the cumulative receptive field size across stacked convolutional layers given each layer's kernel size and stride.

Convolution Output Size Calculator

Calculate the output feature map size after a convolutional layer given input size, kernel size, stride, and padding.

Dropout Rate Calculator

See how many neurons in a layer stay active on average at a given dropout rate, with the standard recommended dropout range for hidden layers explained.

Embedding Layer Size Calculator

Calculate the total parameter count and memory footprint of a neural network embedding layer.

Epoch Time Calculator

Convert a measured per-batch training time into batches per epoch and total wall-clock training duration across a full multi-epoch deep learning training run.

GPU Memory Calculator

Estimate the GPU memory needed to train a neural network, accounting for parameters, gradients, Adam optimizer states, and per-batch activation memory.

Gradient Descent Step Calculator

Run a single vanilla or momentum-based gradient descent weight update by hand, showing the exact arithmetic behind one neural network optimizer training step.

Learning Rate Calculator

Compute the exact learning rate at any training epoch under step decay, exponential decay, time-based decay, or cosine annealing schedules, side by side.

Learning Rate Warmup Calculator

Calculate the current learning rate at a given training step during a linear warmup schedule.

LSTM Parameter Count Calculator

Calculate the total number of trainable parameters in a standard LSTM layer given input and hidden state size.

Model Accuracy Calculator

Turn a confusion matrix into accuracy, precision, recall, specificity, and F1 score, revealing what raw accuracy alone hides on an imbalanced dataset.

Model Compression Ratio Calculator

Calculate the compression ratio and percentage size reduction achieved when compressing a neural network model.

Model Inference Latency Calculator

Estimate model inference latency based on FLOPs required, hardware peak throughput, and expected real-world utilization.

Neural Network FLOPs Calculator

Calculate the floating point operations (FLOPs) required for a dense/fully-connected layer's forward pass.

Neural Network Parameter Calculator

Count the exact weights and biases in a fully-connected neural network layer by layer, from the input architecture through to the total parameter count.

Overfitting Ratio Calculator

Turn the gap between training and validation accuracy into an overfitting ratio, with the standard low, moderate, and high overfitting risk thresholds shown.

Token Count Estimator

Estimate the number of LLM tokens a text will use based on its word count.

Training Cost Calculator

Multiply GPU hourly rate, GPU count, and training hours into a total training cost, with a worked table showing how the total scales with cluster size.

Tuning the Knobs That Actually Matter

Training a machine learning model involves a handful of settings — learning rate, batch size, dropout — that have an outsized effect on whether training succeeds at all, let alone how well. These ten calculators cover the core training and architecture math behind that tuning.

Why Learning Rate Is the Setting to Get Right First

Training behavior at three learning rates Too high a learning rate: loss diverges and never settles. Well-tuned learning rate: loss converges smoothly. Too low a learning rate: loss converges but extremely slowly. Too high (diverges) Well-tuned Too low (slow) Training Steps →
Conceptual training loss behavior at different learning rates — illustrative, not a specific model's actual results.

A learning rate set too high causes the model to overshoot the optimal solution repeatedly rather than settle into it; set too low, training technically works but can take far longer than practical. The Learning Rate Calculator and Gradient Descent Step Calculator help find the useful middle ground.

Popular Machine Learning Calculators

  • Model Accuracy Calculator — calculates the percentage of correct predictions out of total predictions made.
  • Overfitting Ratio Calculator — compares training and validation performance to flag a model memorizing rather than generalizing.
  • GPU Memory Calculator — estimates VRAM required to train a model of a given size and batch configuration.

Related: Data Science Calculators for model evaluation metrics, Statistics Calculators.