John Stuart Mill was a 19th century English philosopher who advocated for utilitarianism as the foundation of morality. Utilitarianism holds that an action is morally right if it tends to promote happiness and wrong if it tends to produce unhappiness. Mill outlined two formulations of utilitarianism: act utilitarianism assesses the morality of individual actions based on their consequences, while rule utilitarianism assesses actions based on whether they conform to rules that maximize happiness if generally followed. Mill believed that rule utilitarianism better accounted for the need for moral rules and precepts in society.