Neural Network Parameter Calculator

Every Weight and Bias, Counted Layer by Layer

A network's parameter count determines its memory footprint, its training cost, and roughly how much data it needs to train well — and for a fully-connected network it's fully determined by the layer sizes alone. This calculator walks the architecture layer by layer and sums the weights and biases connecting each pair, rather than relying on a rough parameter-count estimate.

The Formula

Parameters per layer transition = (n_in × n_out) + n_out  (if biases are included)
Total Parameters = sum of parameters across all layer transitions

Worked Example

Architecture 784 → 128 → 64 → 10 (with biases)
Layer transitionWeights (n_in × n_out)BiasesParameters
784 → 128100,352128100,480
128 → 648,192648,256
64 → 1064010650

Total for this architecture: 109,386 parameters. This is the classic MNIST-digit-classifier shape — a 784-pixel (28×28) input layer down to 10 output classes.

Where This Matters

  • Memory planning — parameter count feeds directly into GPU memory estimates, since each parameter needs storage for its value, gradient, and optimizer state during training.
  • Comparing architectures — two networks with similar accuracy can have very different parameter counts; this calculator makes the trade-off explicit before committing to a design.
  • Overfitting risk — a parameter count much larger than the training set size is a classic early warning sign of overfitting.

How to Use This Calculator

  1. Enter Layer Sizes as comma-separated numbers, from input layer to output layer (e.g. 784,128,64,10).
  2. Choose whether to Include Biases or Exclude Biases.
  3. Select Calculate to see the parameter count for each layer transition and the total.

Related Calculations

Estimate the memory this architecture will need with the GPU Memory Calculator, or watch for overfitting with the Overfitting Ratio Calculator.