Cram was born and raised in Chester, Vermont, to a Scottish immigrant father, and a German immigrant mother. His father died before Cram turned four, leaving him the only male in a family of five. He grew up on Aid to Dependent Children, and learned to work at an early age, doing jobs such as picking fruit, tossing newspapers, and painting houses, while bartering for piano lessons. By the time he turned eighteen, he had worked at least eighteen different jobs.
Cram attended the Winwood High School in Long Island, N.Y.
From 1938 to 1941, he attended Rollins College in Winter Park, Florida on a national honorary scholarship, where he worked as an assistant in the chemistry department, and was active in theater, chapel choir, Lambda Chi Alpha, Phi Society, and Zeta Alpha Epsilon. It was at Rollins that he became known for building his own chemistry equipment. In 1941, he graduated from Rollins College with a BS in chemistry.
In 1942, he graduated from the University of Nebraska–Lincoln with a MS in organic chemistry, with Norman O. Cromwell serving as his thesis adviser. His subject was "Amino ketones, mechanism studies of the reactions of heterocyclic secondary amines with -bromo-, -unsaturated ketones."
In 1947, Cram graduated from Harvard University with a PhD in organic chemistry, with Louis Fieser serving as the adviser on his dissertation on "Syntheses and reactions of 2-(ketoalkyl)-3-hydroxy-1,4-naphthoquinones"