Convolution Calculator
Convolve two discrete sequences — linear by default, or N-point circular — with step-by-step sums and plots.
Convolution Calculator
Comma-separated, up to 500 values.
e.g. −1 if x starts at n = −1.
Calculations use full double precision; this only affects display.
Scale the output plot so its largest magnitude is 1 (values in the table aren't changed).
Linear convolution
y = [0, 1, 2.5, 4, 1.5]
Index range: n = 0 … 4 (5 values)
- Output length
- 5
- First index
- 0
- Last index
- 4
- Sum of y
- 9
- = (Σx)(Σh)
x[n]
h[n]
y[n]
Multiplication and summation steps
- y[0] = x[0]·h[0−0] = 1·0 → 0
- y[1] = x[0]·h[1−0] = 1·1 + x[1]·h[1−1] = 2·0 → 1
- y[2] = x[0]·h[2−0] = 1·0.5 + x[1]·h[2−1] = 2·1 + x[2]·h[2−2] = 3·0 → 2.5
- y[3] = x[1]·h[3−1] = 2·0.5 + x[2]·h[3−2] = 3·1 → 4
- y[4] = x[2]·h[4−2] = 3·0.5 → 1.5
| n | y[n] |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2.5 |
| 3 | 4 |
| 4 | 1.5 |
Linear vs circular convolution
Linear: y[n] = Σk x[k] · h[n − k]Every product of an x value and an h value contributes to the output at the sum of their indices, so the result has Lx + Lh − 1 values and starts at the sum of the two starting indices.
Circular (N-point): y[n] = Σk=0N−1 x[k] · h[(n − k) mod N]Circular convolution wraps indices around modulo N, as the discrete Fourier transform does. It matches linear convolution only when N ≥ Lx + Lh − 1; with a smaller N the tail wraps onto the start (time-domain aliasing). This tool never switches between the two silently.
Your data is processed locally in your browser and is not uploaded to OZVILO servers.
How to use the Convolution Calculator
- 1Enter sequences x[n] and h[n] as comma-separated values.
- 2For linear convolution, set the index of each sequence's first value if it doesn't start at n = 0.
- 3Or choose circular convolution and enter the length N.
- 4Read the output sequence and index range, check the stem plots and the multiply-and-add steps, and download the CSV.
Examples
Linear
- Input
- x = [1, 2, 3], h = [0, 1, 0.5]
- Result
- y = [0, 1, 2.5, 4, 1.5], n = 0…4
3-point circular
- Input
- x = [1, 2, 3], h = [1, 1, 0], N = 3
- Result
- y = [4, 3, 5]
Convolution Calculator features
- Linear convolution with custom start indices
- Explicit N-point circular mode
- Stem plots of x, h and y
- Multiply-and-sum working
- CSV download
Frequently asked questions
What's the difference between linear and circular convolution?
Linear convolution gives the full result of length Lx + Lh − 1. Circular convolution wraps indices modulo N, as the DFT does; it equals linear convolution only when N ≥ Lx + Lh − 1. With smaller N the tail wraps onto the start.
How is the output's starting index found?
It's the sum of the two starting indices. If x starts at n = −1 and h at n = 0, the output starts at n = −1.
How long can the sequences be?
Up to 500 values each, and N up to 1,000 for circular convolution. The calculation is exact direct summation, so results match a hand calculation.
Related tools
- Available
Simpson's Rule Calculator
Approximate a definite integral with Simpson's 1/3 rule, with a node table, graph and error estimate.
CalculatorsOpen tool - Available
Matrix Transpose Calculator
Transpose a matrix of any shape — rows become columns — with index-by-index working.
CalculatorsOpen tool - Available
Fibonacci Sequence Calculator
Generate Fibonacci numbers exactly — the nth term, the first N terms or a range — even with thousands of digits.
CalculatorsOpen tool - Available
QR Decomposition Calculator
Factor a matrix into Q and R with Householder reflections, with rank, error checks and steps.
CalculatorsOpen tool