Convolution Calculator

Convolve two sequences step by step: linear convolution, circular (N-point) convolution or cross-correlation, with every output written as its sum of products, exact fractions and stem plots of the input and output.

Calculator Numbers & Math Updated Oct 3, 2026
How to Use
  1. Choose linear, circular (with its length N) or correlation.
  2. Type x and h as lists of numbers. Fractions and negatives are fine.
  3. If a sequence doesn’t start at n = 0, set its start index; the output’s start follows.
  4. Read the output sequence, its length, sum and largest value.
  5. Show Work writes each output sample as its sum of products; the stem plots line up x, h and the result on one n axis.
Input
Presets
Stem plots
Output
—
Length
—
Sum
—
Largest
—

Worked Example

[1, 2, 3] * [1, 1]. Flip h (it looks the same) and slide it: y[0] = 1·1 = 1; y[1] = 1·1 + 2·1 = 3; y[2] = 2·1 + 3·1 = 5; y[3] = 3·1 = 3. So y = [1, 3, 5, 3], and Σy = 12 = 6 × 2 = Σx · Σh.

Two dice. Each die is [1, 1, 1, 1, 1, 1] starting at face 1. Their convolution is [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1] starting at 2: there are 6 ways to roll a 7 out of 36.

The common mistake: forgetting to flip. Sliding h without flipping it gives the cross-correlation. For a symmetric h like [1, 1] the two agree, which hides the error; with h = [1, 2] they differ: convolution of [1, 2, 3] gives [1, 4, 7, 6], correlation gives [2, 5, 8, 3].

Show Work

Enter two sequences to see each output sample worked out.

Formulas

Linear
y[n] = Σₖ x[k] h[n − k]
Length
len(x) + len(h) − 1
Circular
y[n] = Σₖ x[k] h[(n − k) mod N]
Correlation
r[ℓ] = Σₙ x[n] h[n − ℓ]
Convolution theorem
DFT(x ⊛ h) = DFT(x) · DFT(h)
Sums
Σy = Σx · Σh

One Operation, Many Names

Convolution turns up wherever effects add up over time or space. Euler and Laplace used convolution integrals in the 18th century; in probability the distribution of a sum of independent variables is the convolution of their distributions, which is how the two-dice preset works. Engineers know it as the response of a linear system to any input, built from its response to a single impulse.

The 1965 fast Fourier transform made long convolutions cheap through the convolution theorem, and today the same small sums of products, with h learned rather than designed, are the convolutional layers that let neural networks recognise images.

About This Calculator

This calculator convolves sequences of up to 64 samples with exact fractions, in linear, circular and cross-correlation form, keeping track of where each sequence starts. Every output sample is written out as its sum of products, the linear result is checked against Σx · Σh and shown as polynomial multiplication, and circular convolution warns when it wraps.

Everything runs in your browser; nothing is sent anywhere.

Related calculators: Fourier / Signal Math Lab, Probability Calculator, and Audio Spectrum Analyzer.

Frequently Asked Questions

How do I compute a convolution by hand?

Flip h, slide it along x, and at each position multiply the overlapping samples and add. For x = [1, 2, 3] and h = [1, 1]: y[0] = 1·1 = 1, y[1] = 2·1 + 1·1 = 3, y[2] = 3·1 + 2·1 = 5, y[3] = 3·1 = 3. So y = [1, 3, 5, 3], with length 3 + 2 − 1 = 4.

Why is convolution the same as multiplying polynomials?

Because the coefficient of xⁿ in a product collects every pair of terms whose powers add to n, exactly the convolution sum. (1 + 2x + 3x²)(1 + x) = 1 + 3x + 5x² + 3x³, and the coefficients are the convolution [1, 3, 5, 3]. That is also why the sums multiply: Σy = Σx · Σh.

What is circular convolution?

Convolution where the sequences wrap around after N samples, as they do in the discrete Fourier transform. [1, 2, 3, 4] ⊛ [1, 0, 0, 1] with N = 4 gives [3, 5, 7, 5]: the tail of the linear result folds back onto the start. Choosing N ≥ len(x) + len(h) − 1 removes the wrap, which is how fast convolution with the FFT works.

How is cross-correlation different?

Correlation slides h without flipping it, and measures how well h matches x at each lag. The largest value marks the best alignment, which is how radar, GPS and audio sync find a known signal in a recording. For real sequences, correlating x with h equals convolving x with h reversed.

What does convolution do to a signal?

It applies a filter: h is the filter’s impulse response. h = [1/3, 1/3, 1/3] is a 3-point moving average that smooths noise; h = [1, −1] takes differences and picks out edges. Image blurring and sharpening, echo and reverb, and the layers of a convolutional neural network all work this way.

How do I use the Convolution Calculator?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Signals and systems

An input [1, 2, 3] through h = [1, 1] gives [1, 3, 5, 3].

Smoothing

A 3-point moving average is convolution with [1/3, 1/3, 1/3].

Polynomials

(1 + 2x + 3x²)(1 + x) = 1 + 3x + 5x² + 3x³.

Dice

Convolving [1, 1, 1, 1, 1, 1] with itself counts the ways to roll each total with two dice.

DFT homework

See the wrap-around of a 4-point circular convolution.

Last updated: