Hewlett-Packard was founded in 1939 by Stanford graduates William Hewlett and David Packard to manufacture test and measurement instruments. The company began business in Packard's garage in Palo Alto, California and their first product was a precision audio oscillator and their first major customer was Walt Disney, who bought several of these oscillators for use in the movie Fantasia. Hewlett went off to the war leaving Packard running the business, which quickly expanded into military equipment, notably radios, sonar and radar. When Hewlett returned he took over research and development and left Packard to run the company. The firm thrived on new technologies and attracted many of the brightest graduates in the years that followed. From 1968-1971 Packard was deputy secretary of defence and in the 1970s and 1980s remained an advisor to the White House on defense procurement.

Initially the company acted only as a supplier of equipment but in the 1970s it became known to the general public with the first pocket calculators. In 1980 the company released its first personal computer by which time it had revenues of $3bn a year. Although both Hewlett and Packard slipped into the background in the 1980s they made a comeback in 1990 when they felt that the company's structure had become too bureaucratic. Packard died in 1996 and Hewlett in January 2001. Later that year it was announced that Hewlett-Packard and Compaq would merge operations with HP's Carly Fiorina as chairman and chief executive and Compaq's Michael Capellas as president. There was opposition to the deal from the Hewlett Family but in May 2002 the deal went ahead.

Compaq was a Formula 1 sponsor of Williams from 2000 but the branding was switched to HP in the middle of 2002. Prior to that HP was technical sponsor of several F1 teams.