Most commonly the RMS speed equation of the form v_rms = √(3RT / M) is used. The velocity should be given in (m/s), and the two options for R are [R = 0.08201 L*atm / mol*K] and [R = 8.3145 J / mol*K]. Which of the two R values, based on their units, looks like it can be most easily related to the speed in (m/s) on the other side of the equation? The one with Joules (where 1 J = 1 kg*m^2 / s^2) of course, because that's where the (m/s) will come from when we take apply square root operator on the right side. Let's show it worked out, ignoring constants and looking only at units:
m/s = √(R*T / M)
m/s = √((R*K) / (kg / mol))
m/s = √(((kg * m^2 * s^–2 / mol*K)*K) / (kg / mol))
Cancelling units on the right side...
m/s = √(((kg * m^2 * s^–2 / mol*K)*K) / (kg / mol))
m/s = √(m^2 * s^–2)
Applying the square root...
m/s = m/s
Ta da! Thus, the R used will be R = 8.3145 J / mol*K.