Formula & Calculator

Convolution

Convolution is a mathematical way of combining two signals to produce a third. In system theory, it describes how a system's impulse response shapes an input signal to create the output. Imagine dropping a stone in a pond: the ripples (impulse response) spread and combine with any other waves. In signal processing, convolution is used for filtering, smoothing, and modelling systems.

Signal Processing Linear Systems
DISCRETE-TIME · LINEAR SYSTEMS · SIGNAL PROCESSING

Convolution Calculator

Compute the discrete-time convolution y[n] = x[n] * h[n] for any two finite sequences. See the stem plots, the flip-and-slide method, and the full convolution matrix.

y[n] = Σ x[k] · h[n−k] · length(y) = length(x) + length(h) − 1 · Σy = (Σx)·(Σh)
Input signals
x[n] — first signal
x[n]
Comma- or space-separated values. Index starts at n = 0 by default.
Enter at least 1 numeric value.
h[n] — second signal
h[n]
Impulse response of an LTI system, or any second signal.
Enter at least 1 numeric value.
CONVOLUTION OUTPUT y[n]
—
Output characteristicsy[n]
Length—
Sum Σy—
Energy Σy²—
Peak |y|—
DC gain—
Step-by-step solution
Linearity & shift check
Companion quantities
Signals and their convolution
Convolution sum y[n] = Σk x[k] · h[n−k]
Commutative form y[n] = Σk h[k] · x[n−k]
Length relationship Ny = Nx + Nh − 1
Area / DC sum identity Σn y[n] = (Σk x[k]) · (Σk h[k])

Convolution is both commutative and associative: x * h = h * x, and (x * h₁) * h₂ = x * (h₁ * h₂). This is why cascading linear time-invariant systems is equivalent to convolving their impulse responses — the order does not matter, and only the combined response determines the output.

Graphical representation
Reference — properties of convolution
PropertyStatementImplication

Convolution is the fundamental operation of linear time-invariant (LTI) systems. Every property below follows from the definition and is used constantly in filter design, system identification and signal analysis.

Reference — common convolution pairs
x[n]h[n]y[n] = x * hMeaning

These pairs come up so often they are worth memorising. The impulse is the identity of convolution; the step is the running sum; box filters smooth; the first difference sharpens.

Reference — your computed y[n] table
ny[n]Contributing termsPartial sum

Every output sample y[n] is the sum of the products x[k]·h[n−k] over the overlap region. This table shows each term and the running sum.

Good to know

Convolution is commutative

x * h = h * x. Swapping the input and impulse response gives the same output. This is why block diagrams of LTI systems can be reordered without changing the result.

Cascade = convolve the responses

Two systems in series with impulse responses h₁ and h₂ have a combined response h = h₁ * h₂. This is how a chain of filters is reduced to a single equivalent filter.

Impulse is the identity

δ[n] * x[n] = x[n]. Convolving with an impulse leaves the signal unchanged. A delayed impulse δ[n−k] shifts the signal by k samples.

Sum identity: Σy = Σx · Σh

The total sum of the output equals the product of the input sums. This is a fast sanity check: if you computed y and the sums do not multiply, you made a mistake.

How to use this calculator

Enter the two finite sequences and click Calculate. The output y[n] is computed exactly as the discrete convolution sum, along with the stem plots and step-by-step breakdown.

Enter x[n] and h[n]

Type comma- or space-separated values like 1, 2, 3 or [1 2 3]. Both signals must have at least one sample. Maximum practical length is about 30 samples each — longer sequences make the matrix and stem plots unwieldy.

Use preset signals

Pills for common signals: impulse δ[n], unit step u[n], ramp, exponential decay, alternating ±1, box filter, moving average, and first difference. Click one to load it into the field.

Click Calculate

The page smoothly scrolls to the result card, which flashes briefly. The stem plot of y[n] and the full solution animate into place.

Read the output card

y[n] appears as a numeric array with the length, sum, energy and peak value displayed alongside. The context label summarizes the filter type (smoothing, sharpening, delay, identity).

Examine the charts

Stem plots shows x[n], h[n] and y[n] stacked. Flip & slide shows the flip operation h[n−k] that underlies the algorithm. Convolution matrix shows every product x[k]·h[n−k] and the partial sums that build each output sample.

Advanced mode

Adds start-index offsets for x[n] and h[n], a table of every y[n] with contributing terms, and a full worked convolution table you can cross-check against a hand calculation.

What this tool offers

Exact convolution

Computes y[n] = Σ x[k]·h[n−k] directly from the definition. No shortcuts, no approximations — the same arithmetic you would do by hand, done instantly.

Three visualization modes

Stem plots of x, h and y; the flip-and-slide view showing the reflected h[n−k]; and the full convolution matrix with per-sample partial sums.

Step-by-step solution

Every y[n] shown with its contributing terms: y[n] = x[0]h[n] + x[1]h[n−1] + ... with the arithmetic carried out symbolically and numerically.

Sanity checks

Automatic verification: length(y) = length(x) + length(h) − 1, and Σy = Σx·Σh. If either check fails the algorithm has a bug; if they pass, the arithmetic is almost certainly correct.

Reference tables

Properties of convolution (commutativity, associativity, distributivity, shifting), common convolution pairs (impulse, step, box, exponential) and a fully worked numerical table.

Preset signals

One-click loading of the standard test signals used in signal processing courses and filter design — so you can experiment quickly without typing.

What is discrete-time convolution?

Discrete-time convolution is the mathematical operation that describes the output of a linear time-invariant (LTI) system given its input and its impulse response. For two finite sequences x[n] and h[n], the convolution is defined as y[n] = Σk x[k] · h[n−k], where the sum runs over all integers k such that both x[k] and h[n−k] are defined. The operation is called "convolution" rather than "multiplication" because it involves both multiplying and shifting: for each output index n, you flip one signal (h[k] → h[−k]), slide it by n (giving h[n−k]), multiply pointwise with the other signal, and sum. Convolution is the mathematical heart of LTI systems: if you know how a system responds to a single impulse δ[n], you know how it responds to any input, because every signal can be decomposed into a weighted sum of shifted impulses. The length of the output is Nx + Nh − 1 samples — a useful rule of thumb that makes it easy to predict the output size before computing anything. Convolution is commutative (x * h = h * x), associative ((x * h₁) * h₂ = x * (h₁ * h₂)) and distributive over addition (x * (h₁ + h₂) = x*h₁ + x*h₂), which are exactly the properties that make LTI system analysis tractable. In practice, convolution is used to describe FIR and IIR digital filters, to model echoes and reverberation, to simulate the response of a channel to a transmitted signal, to blur or sharpen images, and — through the convolution theorem — to compute polynomial multiplication efficiently via the FFT. Convolution in the time domain corresponds to multiplication in the frequency domain, which is why filter design is often done in the frequency domain even when the implementation is in the time domain.

x[n]Input signal or first sequence — a finite array of samples indexed by n
h[n]Second signal or impulse response — describes how the system responds to an impulse
y[n]Output signal — convolution of x and h; length Nx + Nh − 1
kDummy summation index in the convolution sum
δ[n]Unit impulse — the identity element of convolution
u[n]Unit step — convolving with u[n] gives the running sum of the input
Frequently asked questions

The first output sample y[0] uses only the overlap between x[0] and h[0]. As n increases, more samples overlap until the full sequences align. The largest index reached is when the last sample of one signal is multiplied by the first sample of the other, which occurs at n = (N_x − 1) + (N_h − 1) = N_x + N_h − 2. Counting from n = 0 to n = N_x + N_h − 2 gives exactly N_x + N_h − 1 samples. This is a consequence of the fact that convolution of two sequences corresponds to multiplying two polynomials whose degrees are N_x − 1 and N_h − 1 — the product has degree N_x + N_h − 2, i.e., N_x + N_h − 1 coefficients.

The convolution sum y[n] = Σk x[k]·h[n−k] contains the term h[n−k], which is h[k] reflected about the origin and then shifted right by n. So for each output index n you: (1) take the second signal h[k] and flip it to get h[−k], (2) slide it right by n to get h[n−k], (3) multiply pointwise with x[k], (4) sum all products. That gives y[n]. Then you increment n and repeat. The name "flip and slide" comes from this visual process, and it is the classic way convolution is taught. It is also a beautiful illustration of why the operation is symmetric: flipping x instead of h, or sliding in the other direction, gives exactly the same result — that is the commutativity property in action.

Convolution is everywhere in signal processing and machine learning. Digital filters: an FIR filter's output is the convolution of the input signal with the filter's impulse response — a moving average is a convolution with a box filter, a low-pass filter is a convolution with a carefully designed kernel. Echo and reverberation: the acoustic response of a room is the impulse response, and the recorded signal is the convolution of the source with the room. Image processing: Gaussian blur, edge detection (Sobel), and sharpening are all convolutions of the image with a 2D kernel. Communications: a channel's effect on a transmitted signal is a convolution with the channel impulse response, and equalizers attempt to invert it. Convolutional neural networks: the entire architecture is built on this operation, learning the kernel weights from data instead of using hand-designed filters. Polynomial multiplication: multiplying two polynomials is equivalent to convolving their coefficient vectors.

Convolution is commutative: x * h = h * x, so the order of the two signals does not matter for the output. But convolution is not trivial — it is not like addition where the order of operations is irrelevant throughout. For three signals, convolution is associative: (x * h₁) * h₂ = x * (h₁ * h₂), which means cascaded LTI systems can be combined in any order without changing the overall response. This is the mathematical property that lets you reduce a block diagram of filters to a single equivalent filter. What convolution is not is distributive over nonlinear operations, and it does not commute with time-varying systems — if h depends on n, the operation is no longer ordinary convolution.

The convolution theorem states that convolution in the time domain corresponds to pointwise multiplication in the frequency domain: F{x * h} = F{x} · F{h}. This is one of the most important results in signal processing. It means that (a) the frequency response of a filter is the product of the frequency responses of its cascaded stages, and (b) you can compute convolution efficiently by transforming both signals, multiplying pointwise, and transforming back — using the Fast Fourier Transform this is O(N log N) instead of the naive O(N²). This is why FFT-based convolution is used in every serious implementation of digital filtering, image processing and, in effect, convolutional neural networks.

Cross-correlation is like convolution but without the flip: (x ⋆ h)[n] = Σ x[k]·h[n+k], whereas convolution has (x * h)[n] = Σ x[k]·h[n−k]. For symmetric signals (like a Gaussian kernel) the two operations are identical. For non-symmetric signals, convolution flips one of them and correlation does not. Correlation measures similarity between signals as a function of shift, while convolution describes the output of an LTI system. In machine learning, what is called "convolutional" in CNN layers is actually cross-correlation — the flip is omitted because the kernel is learned anyway, so it does not matter. This is a common source of confusion when moving between signal processing and deep learning literature.

Educational tool only. This calculator performs exact integer and floating-point arithmetic on the input sequences you provide. It assumes finite-length, real-valued sequences with a well-defined start index. It does not handle infinite sequences, complex-valued signals, 2D convolution, or FFT-based fast convolution. For production signal-processing work, use validated numerical libraries such as NumPy, SciPy or MATLAB.

What it means

Convolution is a mathematical operation that combines two signals x(t) and h(t) to produce a third signal y(t) = (x * h)(t) = ∫ x(τ)h(t−τ) dτ. In linear time‑invariant (LTI) systems, the output is the convolution of the input with the impulse response. Convolution describes the memory of the system: the output at time t depends on the entire past of the input. It is used in filtering, image processing, and communications. In the frequency domain, convolution becomes multiplication (by the convolution theorem), simplifying analysis. Example: An RC low‑pass filter has an impulse response h(t) = (1/(RC)) e^(−t/(RC)) u(t). The output for any input is the convolution of the input with this h(t), which smooths the input signal and removes high frequencies.

Worked example

Convolution – Practical Example

Real‑World
Scenario: The impulse response of a system is h(t) = e−atu(t). The input is a unit step u(t). Find the output using convolution.
ParameterValue
x(t)u(t)
h(t)e−atu(t)
Formulay(t) = x(t) * h(t) = ∫x(τ)h(t−τ)dτ
1For t ≥ 0, y(t) = ∫₀t e−a(t−τ) dτ = (1 − e−at)/a
Final Design y(t) = (1 − e−at)/a ✓ System response
Why: Convolution gives the output of a linear time‑invariant system for any input – it's the cornerstone of system analysis.

Common mistakes

Watch unit consistency and the assumptions behind the formula; misapplying it outside its valid conditions is the most frequent error.

Applications

Convolution y(t) = x(t) * h(t) describes the output of a linear time‑invariant system as the integral of the input multiplied by the impulse response. This is fundamental to system analysis and signal processing. Engineers use convolution to compute the response of circuits and filters, to design equalisers, and to process signals. It is also used in image processing and pattern recognition. Understanding convolution is essential for any work with linear systems and is a core concept in electrical engineering.

  • System response calculation for arbitrary inputs
  • Filter design and impulse response analysis
  • Image processing (blurring, edge detection)
  • Communication channel equalisation
  • Educational understanding of linear systems