🧮
🧮 Math & statistics

Convolution Calculator (discrete convolution of two sequences)

Results update as you type.

Your numbers

Understanding the convolution calculator — concept and principle

This calculator computes the discrete convolution of two finite sequences, such as a signal and a filter kernel. It gives the full output sequence, its length, the largest value and where it occurs, and the first few terms worked out. Use it for signal-processing homework, smoothing data, or multiplying polynomials through their coefficients.

Discrete convolutionSlide, multiply, add1234x0.510.5h flipped0.5y[0]2y[1]4y[2]6y[3]5.5y[4]2y[5]at y[2]: 1·0.5 + 2·1 + 3·0.5 = 4sum 20 = 10 × 2 · peak 6 at y[3]
Each output is the overlap of x with a flipped, shifted h; 4 + 3 − 1 = 6 outputs.

How it is calculated

y[n] = Σₖ x[k] · h[n − k], summed over every k where both terms exist

Output length = N + M − 1, for n = 0 … N + M − 2

The principle

Think of h as the response of a system to a single unit pulse. A signal is a sum of scaled, shifted pulses, and for a linear, time-invariant system the output is the same sum of scaled, shifted responses. Writing that sum out gives the convolution formula. In practice you reverse the kernel, slide it along the signal and, at each position, multiply overlapping values and add them. The same arithmetic multiplies polynomials: the coefficients of (1 + 2t + 3t² + 4t³)(0.5 + t + 0.5t²) are exactly this convolution.

Worked example

Default inputs: x = 1, 2, 3, 4 and h = 0.5, 1, 0.5.

  1. Lengths 4, 3, so the output has 4 + 3 − 1 = 6 values.
  2. y[0] = 1·0.5 = 0.5; y[1] = 1·1 + 2·0.5 = 2; y[2] = 1·0.5 + 2·1 + 3·0.5 = 4.
  3. y[3] = 2·0.5 + 3·1 + 4·0.5 = 6; y[4] = 3·0.5 + 4·1 = 5.5; y[5] = 4·0.5 = 2.
  4. Result y = 0.5, 2, 4, 6, 5.5, 2; largest value 6 at position 3.
  5. Check: sum(y) = 20 and sum(x) × sum(h) = 10 × 2 = 20.

How to read the result

A kernel like 0.5, 1, 0.5 is a smoothing filter: each output blends a value with its neighbours. Because its weights add to 2, it also doubles the overall level; dividing the kernel by its sum keeps the level the same. The extra values at the start and end are where the kernel only partly overlaps the signal; filters often trim or pad these edges.

Common mistakes

Keep in mind: Long sequences are better convolved with fast Fourier transform methods; direct summation is exact but slow for very long inputs.

Frequently asked questions

What is discrete convolution?

A sum of products y[n] = Σ x[k] h[n − k], sliding a reversed kernel across a signal.

How long is the result of a convolution?

N + M − 1 values for sequences of lengths N and M.

How is convolution related to polynomial multiplication?

The coefficients of a product of two polynomials are the convolution of their coefficient lists.

Sources: S. W. Smith, The Scientist and Engineer's Guide to Digital Signal Processing, Ch. 6 "Convolution"

Checked 9 Nov 2026. Smith, S. W., The Scientist and Engineer’s Guide to Digital Signal Processing, Ch. 6 “Convolution”, The Output Side Algorithm, Eq. 6-1 (y[i] = Σⱼ h[j]·x[i − j]; an N-point signal convolved with an M-point impulse response gives N + M − 1 points).

🧮 All math & statistics tools →🌍 Calculators by country →