Let the vector describe the position of a point mass which is part of a conglomeration of such masses. Now write
where R is the vector to the center of mass of the body. If the body's moment of inertia tensor
is
where Einstein summation Eric Weisstein's World of Math has been used to sum over point masses
be the moment of inertia about the axis
References
Landau, L. D. and Lifschitz, E. M. Electrodynamics of Continuous Media, 2nd ed. Oxford, England: Pergamon Press, 1984.