xPert: Computer algebra for metric perturbation theory. We present the tensor computer algebra package xPert for fast construction and manipulation of the equations of metric perturbation theory, around arbitrary backgrounds. It is based on the combination of explicit combinatorial formulas for the nth order perturbation of curvature tensors and their gauge changes, and the use of highly efficient techniques of index canonicalization, provided by the underlying tensor system xAct, for Mathematica. We give examples of use and show the efficiency of the system with timings plots: it is possible to handle orders n=4 or n=5 within seconds, or reach n=10 with timings below 1 h.