"One horsepower is an estimate of the power a standard workhorse can exert: 550 ft.lbs/sec. Before applying any formula, we must first identify the units of torque on you engine. Torque may be listed as foot-pounds or as Newton-meters. As you made no specification, I will assume you automobile secifications use foot-pounds.
The power exerted by a rotating object is the torque it exerts multiplied by the speed at which it rotates. In standard English units, this would be foot-pounds multiplied by radians/second. It is a special property of radians that allows this product to be foot-pounds/second: a radian is a distance around an arc divided by the length of the radius (feet per foot).
We start with 1 horsepower. We want to get to (foot-pounds)x(rpm).
1 hp = 550 ft-lbs/sec = 550 (ft-lbs)x(rad/sec)
1 rad/sec = 60 rad/min = 33,000 (ft-lbs)x(rad/min) 1 revolution=2(pi)radians
1 rpm = 2(pi) rad/min
1 hp = 5252 (ft-lbs)(rpm)
As for source of rpms, that varies from moment to moment. The number of rpms will probably be greatest in the lowest gears. When rpms get too great, a vehicle is usually shifted to a higher gear and a lower rpm for the motor. The torque tends to be greater in lower gears, when the car is trying to speed up. Once at cruising speed, all the engine needs to do is keep the car moving.
Look at the greatest rpm listed on the scale of your tachometer. Use this as a reasonable maximum. Multiply this by your engine's greatest torque. This is an estimate of your vehicle's maximum horsepower. Actual value can vary with speed, with how well oiled the car is, even with humidity."