Bragg was born at Westward near Wigton, Cumberland, the son of Robert John Bragg, a merchant marine officer and farmer, and his wife Mary née Wood, a clergyman's daughter. When Bragg was seven years old, his mother died, and he was raised by his uncle, also named william Bragg, at Market Harborough, Leicestershire. He was educated at the Grammar School there, at King William's College on the Isle of Man and, having won an exhibition (scholarship), at Trinity College, Cambridge. He graduated in 1884 as third wrangler, and in 1885 was awarded a first class honours in the mathematical tripos.