A universal practical formula is given for calculating an integral which includes two confluent hypergeometric functions, power and exponential functions; then by means of this formula, the expressions of the radial matrix elements for a relativistic harmonic oscillator are given.