The phrase "the best of all possible worlds" (Le meilleur des mondes possibles; Die beste aller möglichen Welten) was coined by the German polymath and Enlightenment philosopher Gottfried Leibniz in his 1710 work Essais de Théodicée sur la bonté de Dieu, la liberté de l'homme et l'origine du mal (Essays of Theodicy on the Goodness of God, the Freedom of Man and the Origin of Evil), more commonly known simply as the Theodicy. The claim that the actual world is the best of all possible worlds is the central argument in Leibniz's theodicy, or his attempt to solve the problem of evil.
In Leibniz's works, the argument about the best of all possible worlds appears in the context of his theodicy, a word that he coined by combining the Greek words Theos, 'God', and dikē, 'justice'. Its object was to solve the problem of evil, that is, to reconcile the existence of evil and suffering in the world with the existence of a perfectly good, all-powerful and all-knowing God, who would seem required to prevent it; as such, the name comes from Leibniz's conceiving of the project as the vindication of God's justice, namely against the charges of injustice brought against him by such evils. Proving that this is the best of all possible worlds would dispel such charges by showing that, no matter how it may intuitively appear to us from our limited point of view, any other world – such as, namely, one without the evils which trouble our lives – would, in fact, have been worse than the current one, all things considered.
Leibniz's argument for this conclusion may be gathered from the paragraphs 53–55 of his Monadology, which run as follows:53. Now as there are an infinity of possible universes in the ideas of God, and but one of them can exist, there must be a sufficient reason for the choice of God which determines him to select one rather than another.
54. And this reason is to be found only in the fitness or in the degree of perfection which these worlds possess, each possible thing having the right to claim existence in proportion to the perfection which it involves.