Convolution Output Size Calculator

Calculate convolution, pooling, and transposed layer output shapes, effective kernels, padding, parameters, operations, memory, and complete CNN dimensions with step-by-step results for every axis.

Calculation result

Results update after pressing Calculate Output Size.

Waiting for input
Output tensor shape
Spatial output
Trainable parameters
Estimated MACs
Input spatial elements
Output spatial elements
Output values
Output memory
Spatial change
Effective kernel

Detailed calculation

Enter the layer configuration, then calculate the output.
Layer configuration
Pooling may use ceiling mode in some frameworks.
Spatial dimensions
Channels, filters, and memory
Use input channels for depthwise convolution.
Presets and actions
Layer-by-layer CNN shape calculator

Add the current configuration as a layer. Each new layer automatically receives the previous spatial output and channel count.

No layers have been added.

Formula used

Standard convolution and pooling

Output size equals floor of the padded input calculation. Dilation expands the kernel without adding parameters. Stride controls the distance between kernel positions.

O = floor((I + Pbefore + Pafter − D(K − 1) − 1) / S + 1)

Transposed convolution

Transposed convolution expands a spatial dimension using stride. Output padding resolves certain shape ambiguities. It does not add ordinary input padding.

O = (I − 1)S − Pbefore − Pafter + D(K − 1) + 1 + OP

Effective kernel size

Dilation inserts spaces between kernel elements conceptually. The effective kernel grows while weights remain unchanged. This increases the receptive field efficiently.

Keff = D(K − 1) + 1

How to use
  1. Choose 1D, 2D, or 3D processing.
  2. Select convolution, transposed convolution, or pooling.
  3. Enter input sizes, kernels, strides, dilation, and padding.
  4. Set channels, filters, groups, batch size, and data type.
  5. Calculate and review dimensions, parameters, memory, and operations.
  6. Add layers to build a complete CNN shape sequence.
Example configurations
Example Input Kernel Stride Padding Output
Same convolution 32 × 32 3 × 3 1 × 1 Same 32 × 32
Valid convolution 28 × 28 5 × 5 1 × 1 Valid 24 × 24
Max pooling 32 × 32 2 × 2 2 × 2 Valid 16 × 16
Transposed convolution 16 × 16 4 × 4 2 × 2 1 each side 32 × 32
Understanding convolution dimensions

Valid and same padding

Valid padding adds no zeros around the input. Same padding targets an output based on input and stride. Odd padding may become asymmetric across opposite sides.

Stride and dilation

Larger stride normally reduces the spatial output. Dilation enlarges the effective receptive field. Their combined values determine available kernel placements.

Channels, filters, and groups

Filters determine output channels for ordinary convolution. Groups split input and output channels into independent blocks. Depthwise convolution uses one group per input channel.

Framework differences

Frameworks may define same padding and rounding differently. Pooling ceiling mode can produce one extra position. Always compare the displayed assumptions with model documentation.

Frequently asked questions

What determines convolution output size?

Input size, kernel, stride, padding, and dilation determine output size. Channels do not change spatial dimensions. Filters determine the output channel count.

Why does same padding sometimes use unequal sides?

The required total padding can be odd. One side then receives one extra padded value. Frameworks usually place that extra value at the ending side.

What is the effective kernel size?

The effective kernel includes dilation spacing. It equals dilation times kernel minus one, plus one. Parameters still depend on the original kernel dimensions.

Does pooling have trainable parameters?

Standard max and average pooling have no trainable weights. They still require comparisons or additions. Their output memory can remain substantial.

How are grouped convolution parameters calculated?

Each filter sees input channels divided by groups. Kernel weights multiply by all output filters. Bias adds one value per output filter.

What does output padding do?

Output padding adjusts transposed convolution shape ambiguity. It does not create ordinary padded input values. It must usually remain smaller than stride.

Why can a configuration be invalid?

The effective kernel may exceed the padded input. Strides or dimensions may also be nonpositive. Invalid groups can conflict with channel divisibility.

How is output memory estimated?

Output values multiply by bytes per data value. Batch size and channels are included. Temporary framework memory is not included.

Can this calculator model a complete CNN?

Yes, add each calculated layer to the sequence. The next layer receives the previous output shape automatically. The summary totals parameters and estimated operations.

Related Calculators

CNN Filter Size CalculatorCNN Padding CalculatorCNN Stride CalculatorCNN Receptive Field CalculatorPooling Output Size CalculatorCNN Parameter Count CalculatorImage Tensor Size CalculatorCNN Computational Cost Calculator

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.