EasyUnitConverter.com

Convolution Calculator — Discrete Convolution

Calculate the discrete convolution of two sequences with step-by-step sliding multiplication and summation. Used in signal processing, probability, and systems analysis. See also our Matrix Calculator and Scientific Calculator.

How to Calculate Discrete Convolution

  1. Enter the first sequence as comma-separated values.
  2. Enter the second sequence as comma-separated values.
  3. Click Calculate to compute the convolution.
  4. The output length equals len(seq1) + len(seq2) - 1.
  5. Each output value is the sum of element-wise products at each shift position.

Formula

(x * h)[n] = Σ x[k] · h[n - k] for all valid k Where: x = input sequence (length M) h = impulse response / kernel (length N) y = output sequence (length M + N - 1) For each output index n: y[n] = sum of x[k] × h[n-k] for k = 0 to M-1 (only where 0 ≤ n-k < N)

Example

Convolve x = [1, 2, 3] with h = [0, 1, 0.5]:
y[0] = 1×0 = 0
y[1] = 1×1 + 2×0 = 1
y[2] = 1×0.5 + 2×1 + 3×0 = 2.5
y[3] = 2×0.5 + 3×1 = 4
y[4] = 3×0.5 = 1.5
Result: [0, 1, 2.5, 4, 1.5]

Convolution Properties Reference Table

PropertyExpressionDescription
Commutativex * h = h * xOrder does not matter
Associative(x * h) * g = x * (h * g)Grouping does not matter
Distributivex * (h + g) = x*h + x*gDistributes over addition
Identityx * δ = xConvolving with impulse gives original
Output LengthM + N - 1Length of convolution result
Shiftx[n-k] * h = y[n-k]Shifting input shifts output

Frequently Asked Questions

What is convolution used for?

Convolution is used in signal processing (filtering, smoothing), image processing (blur, edge detection), probability (sum of random variables), and control systems (system response).

What is the output length of convolution?

If sequence 1 has M elements and sequence 2 has N elements, the convolution output has M + N - 1 elements.

Is convolution the same as correlation?

No. Convolution flips one sequence before sliding, while correlation does not flip. For symmetric sequences, they give the same result.

What is the relationship between convolution and multiplication?

By the convolution theorem, convolution in the time domain equals multiplication in the frequency domain. This is why FFT-based convolution is efficient for long sequences.

Can I convolve sequences of different lengths?

Yes. The two input sequences can have any length. The output length will be len(seq1) + len(seq2) - 1.

Related Calculators