A relativistic generalization of the classical virial theorem is obtai
ned for any stationary and asymptotically flat spacetime. This formula
tion is derived within the 3+1 formalism of general relativity. It may
be useful as a consistency check of numerical solutions of the Einste
in equations.