Skip to content
AllCalcHub

Z-Transform Calculator

Find Z-transforms and inverse Z-transforms with the table and partial fractions, and solve linear difference equations with initial values.

About the Z-Transform Calculator

The Z-transform X(z) = Σ x[n] z⁻ⁿ (n from 0) turns a sequence into a function, as the Laplace transform does for signals in continuous time. The table gives Z{aⁿ} = z/(z − a), Z{n aⁿ} = az/(z − a)², and for cos and sin the quadratic z² − 2az cos θ + a² underneath; multiplying by n corresponds to −z d/dz.

Inverses are found by splitting X(z)/z into partial fractions (that's why the z is taken out: each piece then becomes a table entry z/(z − a)). A difference equation such as y(n+2) − 3y(n+1) + 2y(n) = 0 is solved by transforming with the shifting rule Z{y(n+1)} = zY − z y(0), solving for Y(z) and inverting.

The formula

X(z) = Σ x[n] z⁻ⁿ; Z{aⁿ} = z/(z − a); Z{n x[n]} = −z X′(z)

Z{y(n+1)}
zY(z) − z y(0)
Z{y(n+2)}
z²Y(z) − z² y(0) − z y(1)

Worked example

y(n+2) − 3y(n+1) + 2y(n) = 0, y(0) = 0, y(1) = 1

  1. (z² − 3z + 2)Y = z
  2. Y/z = 1/((z − 1)(z − 2)) = 1/(z − 2) − 1/(z − 1)
  3. y(n) = 2ⁿ − 1

Questions people ask

Why divide by z before the partial fractions?

So each piece is A/(z − a); multiplying back by z gives Az/(z − a), whose inverse is A·aⁿ straight from the table.

How is the answer checked?

By long division of X(z) in powers of 1/z, which gives x[0], x[1], … exactly; the closed form must reproduce them. For a difference equation, the recurrence itself is run in exact fractions.