William Whewell was born in Lancaster on 24 May 1794, son of John Whewell, master carpenter. Whewell's talents were spotted by Joseph Rowley, Master of Lancaster Grammar School, who offered to teach him for free. When John Hudson, a Fellow of Trinity College, prophesied that Whewell would be among the top six Wranglers at Cambridge, Whewell moved to Heversham School, which offered an exhibition to Trinity.
Whewell came up to Trinity in 1812 and graduated Second Wrangler in 1817. In the same year he was elected to a Fellowship and the following year was appointed Assistant Tutor, becoming Tutor in 1823.
Whewell was famously a polymath. He wrote on subjects as diverse as mechanics and church architecture, English hexameter and the plurality of worlds. In 1828 he was elected to the Chair of Mineralogy, which prompted an immediate essay on mineralogical classification and experiments in a Cornish mine with George Biddell Airy in an attempt to determine the density of the Earth. However, he resigned the Chair in 1832. In June 1838 he was elected to the Knightbridge Chair of Moral Philosophy, which he held until 1855.
Between 1833 and 1850 he published a number of papers on tides. In 1837 he published his History of the Inductive Sciences and in 1840 the sequel The Philosophy of the Inductive Sciences. In the former year he also published his On the Principles of an English University Education which he was to expand into Of a Liberal Education in General, with particular reference to the leading studies of the University of Cambridge, publishing the first volume (of three) in 1845.
Once he had resigned his tutorship in 1839, Whewell began to tire of college life and considered taking a parish. He married Cordelia Marshall, daughter of the wealthy Leeds flax merchant John Marshall, and Jane his wife, a school friend of Dorothy Wordsworth's. Their marriage took place on October 12, 1841, and on the same day Trinity's Master Christopher Wordsworth announced his intention to retire, safe in the knowledge that the new prime minister Sir Robert Peel would not propose a Whig to replace him. Whewell took formal possession of the Master's Lodge on 16 November.
For much of his tenure as Master, University reform was in the air. In 1844 the College statutes were revised. In 1850 the Royal Commissions on Oxford and Cambridge Universities began their investigations. A reformer in his youth, Whewell was a reactionary as Master and sternly defended the autonomy of the colleges and the type of liberal education he espoused in his 1845 book.
Whewell served as the university's Vice-Chancellor twice: in 1842-43 and 1855-56. Cordelia Whewell died on December 18, 1855. Whewell married Frances Everina Affleck, the widow of Sir Gilbert Affleck on 1 July 1858. Lady Affleck, a name she continued to use after her remarriage, died 1 April 1865. Neither marriage had produced children. On 24 February 1866, Whewell fell from a horse while riding near Cambridge, and died of his injuries on 6 March.
Towards the end of his life, Whewell set about endowing his college and the university. Two courts were built opposite the Great Gate of Trinity with monies provided by Whewell, although only one was completed during his lifetime. He also endowed six university scholarships and a chair of International Law, the latter with the express intention of making war less likely.