 His parents were railroad engineer Herman Haupt and Ann Cecilia Keller.He attended the University of Pennsylvania (UPenn) as a freshman for the 1861/2 academic year.He continued his undergraduate education at the Lawrence Scientific School of Harvard University, and finally graduated from the United States Military Academy at West Point, New York, in 1867.