A general quantum-mechanical method for computing kinetic isotope effects is presented. The method is based on the quantum-instanton approximation for the rate constant and on the path-integral Metropolis-Monte Carlo evaluation of the Boltzmann operator matrix elements. It computes the kinetic isotope effect directly, using a thermodynamic integration with respect to the mass of the isotope, th...