The momentum ray transform I k integrates a rank m symmetric tensor field f over lines in R n with the weight t k : (I k f)(x,ξ)=∫ ∞ -∞ t k 〈 f(x+tξ),ξ m〉 dt. In particular, the ray transform I=I0 was studied by several authors since it had many tomographic applications. We present an algorithm for recovering f from the data (I 0 f,I 1 f,…,I m f). In the cases of m=1 and m=2, we derive the Reshetnyak formula that expresses ∥f∥Hst(ℝn) through some norm of (I 0 f,I 1 f,…,I m f). The Hst-norm is a modification of the Sobolev norm weighted differently at high and low frequencies. Using the Reshetnyak formula, we obtain a stability estimate.