convolution calculator

Need a quick way to compute discrete-time convolution? Use the calculator below to convolve two sequences, inspect the output index range, and view every output value in table form. It works for signal processing homework, DSP filter checks, and probability mass function combinations.

Discrete Convolution Calculator

Enter two finite sequences with commas or spaces (for example: 1, 2, 3).

Accepted separators: commas or spaces

How convolution works

Convolution is a core operation in mathematics, engineering, and data science. In discrete time, it combines two sequences to produce a third sequence that tells you how one sequence modifies or filters the other.

y[n] = Σ x[k] · h[n - k]

In practical terms: you flip one sequence, shift it over the other, multiply aligned values, and sum. Repeat for each shift to build the full output sequence.

How to use this calculator

  • Enter x[n] and h[n] using numbers separated by commas or spaces.
  • Set optional starting indices if your sequences begin at values other than n = 0.
  • Choose output mode:
    • Full: returns every possible overlap.
    • Same: trims to the length of x[n].
    • Valid: keeps only positions with full overlap.
  • Click Calculate Convolution to see the resulting sequence and index mapping.

Worked example

Input

If x[n] = [1, 2, 3] and h[n] = [0, 1, 0.5], then the full convolution is:

y[n] = [0, 1, 2.5, 4, 1.5]

This output has length 3 + 3 - 1 = 5. Each output value is a weighted sum from overlap between x and a shifted/flipped version of h.

Why convolution matters

Digital signal processing (DSP)

Convolution is how finite impulse response (FIR) filters are applied. Audio equalizers, noise reduction pipelines, and communication systems all rely on it.

Probability

The distribution of the sum of independent random variables is a convolution of their distributions. For example, dice-roll sums are computed this way.

Image processing and computer vision

Blur, sharpen, edge detection, and many feature extraction techniques use 2D convolution kernels. CNNs in deep learning are built around this same concept.

Common mistakes to avoid

  • Mixing up correlation and convolution (convolution includes sequence reversal).
  • Forgetting the expected output length for full convolution: N + M - 1.
  • Using wrong index offsets when sequences do not start at n = 0.
  • Rounding too early when working with decimal coefficients.

Final notes

This convolution calculator is designed for quick, transparent checks on finite discrete sequences. For larger scientific workloads, you can cross-check results with tools such as NumPy, MATLAB, or Octave. Still, using a simple calculator like this is one of the best ways to build intuition for how convolution actually behaves.

🔗 Related Calculators