Most arguments for the existence of God begin with an observation and proceed to a conclusion. The Teleological argument, for example, begins with the observation that the initial conditions and physical constants of the universe are fine tuned for the development of intelligent life. It then argues that, since it is prohibitively improbable that this happened by chance, fine tuning implicates the activity of an intelligent agent. The Ontological Argument is different. It makes no appeal to observation at all. Instead, it attempts to establish the existence of God from first principles.
The Classical Version. The first ontological argument was put forward by Saint Anselm in the twelfth century. Anslem said that the statement, “It is possible to conceive of a being than which none greater can be conceived,” is incoherent if that being does not exist for in that case a still-greater being can be conceived: one that does exist. To his way of thinking, imputing nonexistence to the “greatest conceivable being” was like imputing finitude to “the greatest possible number” and so implying that that number is both finite and infinite. And since postulating the nonexistence of God seems to entail an analogously illogical state of affairs, and since illogical states of affairs cannot obtain in the real world, God must exist. Rene Descartes and Gottfried Leibniz both independently formulated similar arguments.
Kant, though himself a theist, famously objected to all this by insisting that existence is not a property. To say that something exists or does not exist is just to say that its properties are or are not exemplified in the world. When one says that an apple is red, sweet and round, for instance, one is describing its properties. But if they add that the apple “exists” they are not describing a further property possessed by the apple but merely telling you that the apple and its properties are exemplified. Anslem, Kant concluded, was inferring the existence of God out of an illicit conception of existence and nonexistence as properties that can be imputed to God. This objection remained influential until the twentieth century when the American analytic philosopher Alvin Plantinga reformulated the argument in a way which escapes it.
The Modal Logic Version. Plantinga’s version of the argument is much less confusing than Anselm’s but understanding it requires a familiarity with a few simple concepts of modal logic. I will briefly explain these now.
Modal Logic. Modal logic is concerned with the ways in which propositions are either possibly or necessarily true or false.  In analysing propositions in this way modal theorists make use of the concept of possible worlds. Bachelors are unmarried is necessarily true if there is no possible world in which it is false; Bachelors are married is necessarily false if there is no possible world in which it is true; and John is a bachelor is possibly true if there are some possible worlds in which it is true and some possible worlds in which it is false. But what exactly is meant by “possible world”?
Possible Worlds. It is important to understand that a possible world is not another planet or a parallel universe. For the purposes of modal logic it is a comprehensive description of a possible reality where “possible reality” is analogous to “hypothetical state of affairs” with the added condition that it entails no logical contradictions. For example: A world precisely like this one except that Sandro Botticelli was a sonneteer is a possible world. It entails no logical contradiction and so “exists” in modal logic just as the set of all prime numbers “exists” in set theory. On the other hand, a world precisely like this one except that Botticelli was a “married bachelor” is not a possible world. It contains a logical contradiction and so does not exist. Just there are infinitely many sets in set theory, so there are infinitely many possible worlds in modal logic. And critically: our world, the actual world, is also a possible world in modal theory because it contains no logical contradictions (married bachelors, square circles, integers which are both odd and even, etc.) and, of course, because it exists and could not exist if it were not possible.
The Argument. Using the concept of possible worlds just described, Plantinga first asks us to consider the proposition, It is possible that a Maximally Excellent Being exists where “a Maximally Excellent Being” is one that possesses every excellence to the maximal degree; i.e., is unlimited in power, intelligence, virtue, knowledge, freedom, and so on. So defined, does the concept of a Maximally Excellent Being contain a logical contradiction? Unless it can be shown that this proposition contains a logical contradiction (and it is not obvious that it can) then, together with Botticelli the Sonneteer, a maximally excellent being exists in some possible world. Plantinga then asks us to consider the proposition, It is possible that a Maximally Great Being exists where “a Maximally Great Being” is one that possesses maximal excellence in every possible world. Unless it can be shown that this proposition contains a logical contradiction (and it is not obvious that it can) we must conclude that God exists,
P1. It is possible that a Maximally Great Being exists. (It contains no logical contradiction of the sort, “married bachelor,” or “square circle.”)
P2. If it is possible that a Maximally Great Being exists, then a Maximally Great Being exists in some possible world. (This follows trivially from P1 in modal logic.)
P3. If a Maximally Great Being exists in some possible world, then it exists in every possible world. (This is entailed by the definition of maximal greatness.)
P4. If a Maximally Great Being exists in every possible world, then it exists in the actual world. (Because the actual world is also a possible world.)
P5. If a Maximally Great Being exists in the actual world, then a maximally great being exists.
C. Therefore, a Maximally Great Being exists.
We can see that Plantinga’s argument is Kant-proof because it does not presuppose the existence of the Maximally Great Being; i.e., Plantinga does not take existence to be a property that is or is not imputed to God. Recall: When we say that Botticelli the Sonneteer “exists” in some possible world we are not committing ourselves to saying that he existed in the actual world. We merely acknowledge that it is logically possible that the man Botticelli might have chosen to write sonnets instead of paint; therefore, Botticelli the Sonneteer is a logical possibility. Plantinga, likewise, does not commit himself to saying that a Maximally Great Being exists in the actual world when he suggests that it exists in some possible world. The intrusion of the Maximally Great Being into the actual world is not an entailment of his modal conjecture in the first premise but an entailment of the subsequent fact that one of the sum of all possible worlds which the maximally great being exhaustively occupies happens to be exemplified.
Parodies of the Argument. Bertrand Russell, who was at one point convinced by Anslem’s version of the argument, opined that, “It is easier to feel convinced that the argument must be fallacious than it is to find out precisely where the fallacy lies.”  In response to this difficulty skeptics have tended to construct a parody whose conclusion is absurd. Thus Gaunilo, a contemporary of Anselm, invited his readers to conceive of an island more excellent than any other and suggested that, by Anselm’s reasoning, it must exist. Others have suggested that the argument can be used to prove the existence of virtually anything: a maximally great but evil being, a Flying Spaghetti Monster, an Invisible Unicorn, and so on. And quite recently the Australian philosopher Douglas Gasking developed an argument which attempts to prove God’s nonexistence,
The merit of an achievement is the product of its quality and the creator’s disability: the greater the disability of the creator, the more impressive the achievement. Nonexistence would be the greatest handicap. Therefore, if the universe is the product of an existent creator, we could conceive of a greater being—one which does not exist. A nonexistent creator is greater than one which exists, so God does not exist.
In order to understand why all such parodies fail, we need to set out the concept of “maximal excellence” more carefully.
A Perfect Island. In reflecting on this parody we realise that the excellence of the Maximally Excellent Being is “maximisable” in a way that the excellence of an island is not. The knowledge of the Being is maximal if there are no limits to what it knows; its power is maximal if there are no limits on what it can do; its intelligence is maximal if there are no limits on what it can think. But the maximisation of excellence with respect to islands cannot be objectively formulated in this way. One can always add more palm trees, for example; more beaches; more coves. Moreover, the features which are conducive to the perfection of islands are relative to the tastes of the individual contemplator. A maximally excellent island is therefore an incoherent notion.
A Maximally Great But Evil Being. Leibniz has given an argument to show that omniscience and moral perfection are mutually inclusive: all freely willed action strives towards some goal; all goals are the pursuit of some good entertained by the agent; the scope and quality of entertainable goods is dependent on knowledge; the maximisation of knowledge perfects an agent’s judgment of the good. An evil being therefore lacks perfect knowledge; and lacking perfect knowledge, is not omniscient; and lacking omniscience, cannot be omnipotent since there will be some actions it lacks the knowledge to perform. The proposition, It is possible that a maximally great but evil being exists is therefore broadly incoherent. A being cannot be both evil and maximally great.
A Flying Spaghetti Monster. All parodies of this sort fail for the same reason. To be maximally great, an entity must be perfectly free and a being that is permanently confined to a particular material body or even to a particular immaterial form is not perfectly free. In response to this the skeptic may wish to amend his claim by adding that his Flying Spaghetti Monster can change bodies and forms at will but this is no solution: It requires him to postulate an immaterial being who is free to assume whatever form it chooses and in so doing returns him to the Maximally Great Being of the original argument. Ultimately, such parodies simply give Plantinga’s Maximally Great Being an arbitrarily ridiculous name without avoiding the conclusion of his argument.
A Nonexistent Creator. The definition of merit on which this argument depends is highly questionable. But there is a far more obvious problem. We have seen that the contents of a possible world are by definition conditional on logical coherence. Gasking’s nonexistent creator is paradigmatically incoherent: A creator, very obviously, must exist in the real world in order to have causal agency in the real world. It is possible that a nonexistent creator exists is strictly incoherent in the way that Square circle and Married bachelor are.
Other Parodies. What has been demonstrated here for perfect islands, maximally great but evil beings and nonexistent creators can be demonstrated for every possible parody: However far and wide one casts about for candidate entities, proper attention to the logic of the argument produces a list of one. And this is because whatever entity is fed into the argument and adjusted to met the conditions of maximal excellence and logical coherence becomes indistinguishable from the God of classical theism.
Conclusion. An argument is valid if its conclusion follows logically from its premises and sound if it is valid and its premises are all true. There is broad agreement that Plantinga’s modal logic version of the ontological argument is valid.  But is it sound? Schopenhauer, himself a resolved atheist, was content to dismiss the argument as a, “charming joke.” But Anselm, Descartes and Leibniz were not its only proponents. In recent times, Kurt Gödel, Charles Hartshorne and Norman Malcolm have all formulated and presented ontological arguments while Plantinga’s modal logic version enjoys the continued support of many contemporary philosophers.  The eminent metaphysician Peter van Inwagen probably summarises the current state of the debate fairly when he writes that, “anyone who wants to claim either that this argument is sound or that it is unsound is faced with grave difficulties.” However, it is surely an interesting and significant thing that there may be one indefeasible a priori argument for the existence of God.
 It may be helpful to what follows for me to briefly explicate the three modal categories: If a proposition is metaphysically necessary its negation contains or entails a contradiction. For example: “2+2=4” and “There is a number between 4 and 6.” If a proposition is metaphysically impossible, on the other hand, its affirmation contains or entails a contradiction. For example: “2+2=3” or “The Prime Minister of England is a prime number.” And finally, if a proposition is metaphysically possible neither its affirmation nor its negation contains or entails a contradiction. For example: “There is a cat in Buckingham Palace,” or “One day there will be cities on the moon.” It is also important not to confuse metaphysical possibility with epistemic possibility: The latter simply refers to our knowledge or lack of knowledge regarding the truth of some proposition with no bearing on its modal status. For example: “John is absent; it is possible he is unwell,” or “It is possible that 9/11 was an inside job—who knows?” With these distinctions in place, it is possible to reduce Plantinga’s argument to a single proposition: If it is metaphysically possible that it is metaphysically necessary that God exists, God exists.
 In his autobiography, Russell relates that he was returning from the tobacconist when the realisation struck and inspired a rather dusty oath. “Great God in Boots,” he reports himself as exclaiming, “the ontological argument is sound!”
 A computerised theorem prover has also shown this to be the case. See the Australasian Journal of Philosophy, Volume 89, 2011.
 The Ontological Argument shows that if it is possible that God exists, it is necessary that God exists. William Lane Craig rightly points out that this increases the atheist’s burden of proof considerably. To discharge this argument it will not suffice for him to argue that God does not exists de facto; he needs to show that God cannot exist de jure.