William (Bill) Hewlett and David (Dave) Packard both graduated in electrical engineering from Stanford University in 1934. The company originated in a garage in nearby Palo Alto during a fellowship they had with a past professor, Frederick Terman at Stanford during the Great Depression. Terman was considered a mentor to them in forming Hewlett-Packard.
The partnership was formalized on January 1, 1939 with an investment of US$538. Hewlett and Packard tossed a coin to decide whether the company they founded would be called Hewlett-Packard or Packard-Hewlett. Packard won the coin toss but named their electronics manufacturing enterprise the "Hewlett-Packard Company".