He was born in Walpole, New Hampshire, the son of William Hooper and Elvira Pulsifer Hopper, and grew up on his parents' farm. After local schooling he studied at Antioch College, Yellow Springs, Ohio, from 1867–1871, and in 1872 enrolled at Harvard University to study biological sciences, where Louis Agassiz and Asa Gray were among his professors. He participated in the first biological summer school at the short-lived Anderson School of Natural History, founded by Agassiz in 1873 on Penikese Island, Cape Cod. After graduating with a B.A. in 1875 (Hon. M.A. 1897) he worked for the Smithsonian Institution to study algae and coralline formations in the Florida Keys.