John Stuart Mill wrote a famous book, entitled “Utilitarianism“.
Utilitarianism was first formulated by Jeremy Bentham, and though it was a sound moral theory, it received some serious criticism. The objection was that utilitarianism does not take into account the individual, and that some moral principles need to be followed, even for the benefits of a single individual. John Stuart Mill went deep into defending his standpoint. He stated that when you optimize for maximum utility for the greatest number of people on the long term – emphasis on the long term – utilitarianism is actually not the cold-hearted calculating moral theory that it looks like.
But there was one element he could not reconcile with utilitarianism. He had the intuition that human beings are entitled to an intrinsic respect, no matter what. Even when you optimize for the whole of humanity nong term. I like that!