The development of the steam engine provided a reason to compare the output of horses with that of the engines that could replace them. In 1702, Thomas Savery wrote in The Miner's Friend:
So that an engine which will raise as much water as two horses, working together at one time in such a work, can do, and for which there must be constantly kept ten or twelve horses for doing the same. Then I say, such an engine may be made large enough to do the work required in employing eight, ten, fifteen, or twenty horses to be constantly maintained and kept for doing such a work…
The idea was later used by James Watt to help market his improved steam engine. He had previously agreed to take royalties of one third of the savings in coal from the older Newcomen steam engines. This royalty scheme did not work with customers who did not have existing steam engines but used horses instead.
Watt determined that a horse could turn a mill wheel 144 times in an hour (or 2.4 times a minute). The wheel was 12 feet (3.7 m) in radius; therefore, the horse travelled 2.4 × 2π × 12 feet in one minute. Watt judged that the horse could pull with a force of 180 pounds-force (800 N). So:
Watt defined and calculated the horsepower as 32,572 ft⋅lbf/min, which was rounded to an even 33,000 ft⋅lbf/min.
Watt determined that a pony could lift an average 220 lbf (0.98 kN) 100 ft (30 m) per minute over a four-hour working shift. Watt then judged a horse was 50% more powerful than a pony and thus arrived at the 33,000 ft⋅lbf/min figure. Engineering in History recounts that John Smeaton initially estimated that a horse could produce 22,916 foot-pounds (31,070 N⋅m) per minute. John Desaguliers had previously suggested 44,000 foot-pounds (60,000 N⋅m) per minute and Tredgold 27,500 foot-pounds (37,300 N⋅m) per minute. "Watt found by experiment in 1782 that a 'brewery horse' could produce 32,400 foot-pounds [43,900 N⋅m] per minute." James Watt and Matthew Boulton standardized that figure at 33,000 foot-pounds (45,000 N⋅m) per minute the next year.
A common legend states that the unit was created when one of Watt's first customers, a brewer, specifically demanded an engine that would match a horse, and chose the strongest horse he had and driving it to the limit. Watt, while aware of the trick, accepted the challenge and built a machine which was actually even stronger than the figure achieved by the brewer, and it was the output of that machine which became the horsepower.
In 1993, R. D. Stevenson and R. J. Wassersug published correspondence in Nature summarizing measurements and calculations of peak and sustained work rates of a horse. Citing measurements made at the 1926 Iowa State Fair, they reported that the peak power over a few seconds has been measured to be as high as 14.9 hp (11.1 kW) and also observed that for sustained activity, a work rate of about 1 hp (0.75 kW) per horse is consistent with agricultural advice from both the 19th and 20th centuries and also consistent with a work rate of about 4 times the basal rate expended by other vertebrates for sustained activity.
When considering human-powered equipment, a healthy human can produce about 1.2 hp (0.89 kW) briefly (see orders of magnitude) and sustain about 0.1 hp (0.075 kW) indefinitely; trained athletes can manage up to about 2.5 hp (1.9 kW) briefly
and 0.35 hp (0.26 kW) for a period of several hours. The Jamaican sprinter Usain Bolt produced a maximum of 3.5 hp (2.6 kW) 0.89 seconds into his 9.58 second 100-metre (109.4 yd) dash world record in 2009.