The ontological argument was originally written by a Benedictine monk named Anselm, the Archbishop of Canterbury, in his book Proslogion in 1078. Ontology is the branch of metaphysics that deals with the nature of being and existence. The argument is based on the greatest idea, God, must exist because it is greater to exist than to not exist.
Even Anselm's contemporaries recognized its flaws; another monk, Guanilo of Marmoutiers, is remembered for using Anselm's reasoning to "prove" that the perfect island exists in On Behalf of the Fool.
There is a lesser known ontological argument by Descartes.
The classic ontological argument for the existence of God runs as follows:
- I have an idea of God as the greatest conceivable being.
- A being can exist merely as an idea or as an idea and in reality.
- It is greater to exist in reality too rather than just as an idea.
- If I think of this greatest conceivable being as existing merely as an idea, then I can think of a greater being, i.e. a being that exists in reality too.
- This greatest conceivable being must exist in reality too, i.e. God exists.
As Anselm wrote:
- "[Even a] fool, when he hears of … a being than which nothing greater can be conceived … understands what he hears, and what he understands is in his understanding.… And assuredly that, than which nothing greater can be conceived, cannot exist in the understanding alone. For suppose it exists in the understanding alone: then it can be conceived to exist in reality; which is greater.… Therefore, if that, than which nothing greater can be conceived, exists in the understanding alone, the very being, than which nothing greater can be conceived, is one, than which a greater can be conceived. But obviously this is impossible. Hence, there is no doubt that there exists a being, than which nothing greater can be conceived, and it exists both in the understanding and in reality."
In this argument, existence is given as one of God's attributes as part of the definition: if X is God, then X has the property of existence. This is logically equivalent to "if X does not exist, then X is not God." It does not prove that there are any entities that actually match the definition.
Existence is not an attribute or predicate
The argument treats existence as an attribute of a maximally great being. However, existence can hardly ever be considered as an attribute by philosophers, as something non-existent cannot have attributes.  Therefore, making conclusions about existence of an entity based on its properties is not logically sound. In short, this argument boils down to "show me a god, and I'll show you an existing god." It is a form of begging the question because the existence is built into the assumptions.
As a reductio ad absurdum:
- I define a unicorn as having certain properties that entail it exists.
- It is possible that unicorns exist.
- Therefore, unicorns exists.
The flaw was first identified by Immanuel Kant, who pointed out:
- "It is absurd to introduce—under whatever term disguised—into the conception of a thing, which is to be cogitated solely in reference to its possibility, the conception of its existence. If this is admitted, you will have apparently gained the day, but in reality have enounced nothing but a mere tautology. [...] Being is evidently not a real predicate, that is, a conception of something which is added to the conception of some other thing."
While Kant's argument is generally accepted, there are some that argue existence is indeed a predicate. Also, Alvin Plantinga and others argued that Kant's objection is irrelevant to the ontological argument because it is not immediately obvious where Anselm makes existence a predicate. However, it is arguable that Kant does address Anselm's version (and some variants) because existence is smuggled in by definitions or premises, which effectively defines existence as a predicate.
It is important to distinguish between definitions and premises when examining the argument. There are various definition statements in the ontological argument, but the only premise seems to be "it is possible that God (as defined by the argument) exists". It should be obvious, however we define "God", that this premise alone cannot support the conclusion "God exists".
One of the earliest objection to the ontological argument, pointed out by Anselm's contemporary Gaunilo of Marmoutier, is reductio ad absurdum by examples:
- Shangri-La is the greatest place on earth.
- A place that exists is greater than one that doesn't.
- Other places exist and Shangri-La is great than those.
- Therefore, Shangri-La exists.
- Hercules is the greatest warrior in history.
- A warrior that existed is greater than one that did not.
- Other warriors exist and Hercules is great than those.
- Therefore, Hercules existed.
Clearly, the conclusions are absurd which suggests a problem with this line of reasoning. There is no obvious reason why the ontological argument only applies to a maximally great being.
Apologists claim that the argument only applies to necessarily existent beings. This is an unsupported assertion (and special pleading) since they have no way of demonstrating that the argument only applies to necessary beings. By assuming the argument only applies to necessary beings, the apologist is also begging the question that God exists. "[...] one can remove the idea of necessity and still leave the ontological argument completely intact."
Assumption that existence is greater than non-existence
Assuming that existence and non-existence can actually be properties of something, there is no logical justification for existence being greater than non-existence. This is an unsupported assertion.
- "But even in a ‘hypothetical universe’ where no God exists, one could still conceive of a ‘greatest possible being’. There’s no logical connection between ‘I can conceive of a greatest possible being’ to ‘this being exists’."
As Kant pointed out, 'God does not exist' is not a self-contradictory proposition.
- Main Article: Which God?
No specific God or religion is supported by the argument.
- A being that contains all the parts of another plus one extra part is the greater being.
- There cannot exist any part that is not a part of the greatest possible being.
- Therefore, the greatest possible being encompasses the entire universe -- hence Pantheism.
- If 1. is false, there is no reason to believe that the greatest possible being encompasses anything -- the greatest possible being is indistinguishable from nothing.
- If 1. is false and 4. is false because the greatest possible being is the one that encompasses all intrinsically positive things and no intrinsically negative things, then "a being that exists is greater than one that does not" is not true unless existence is intrinsically good.
Affirming the consequent
The argument also contains a converse error. The second premise amounts to "If a thing exists then it has greatness," while the conclusion assumes the reverse: "If a thing (the god) has greatness then it exists."
Another problem with the classical version of the argument is that it is a non sequitur. So even if the premises are true, the conclusion is not guaranteed to be true. The fourth premise is supposed to show that there is a contradiction in supposing the greatest conceivable being merely exists as an idea. This, at most, would show that when thinking of this being one would have to suppose this being exists. So even if there are no other problems with the argument, it only proves that I must think of God existing; it does not prove that there is a being actually out there that fits my idea.
An argument for the Devil
An ontological argument can be used to prove the existence of the Devil.
- I have an idea of the Devil as the worst conceivable being.
- A being can exist merely as an idea or as an idea and in reality.
- It is worse for the worst conceivable being to exist in reality too rather than just as an idea.
- If I think of this worst conceivable being as existing merely as an idea, then I can think of a worse being, i.e. a being that exists in reality too.
- This worst conceivable being must exist in reality too, i.e. the Devil exists.
A piece of parody for the non-existence of god is as follows: 
- The creation of the universe is the greatest achievement imaginable.
- The merit of an achievement consists of its intrinsic greatness and the ability of its creator.
- The greater the handicap to the creator, the greater the achievement (would you be more impressed by Turner painting a beautiful landscape or a blind one-armed dwarf?)
- The biggest handicap to a creator would be non-existence
- Therefore if we suppose that the universe is the creation of an existing creator, we can conceive a greater being — namely, one who created everything while not existing.
- Therefore, God does not exist.
Proof by logic
- Main Article: Proof by logic
The argument effectively defines God into existence without considering factual evidence. However, "God exists" is a synthetic proposition.
"The very idea that grand conclusions could follow from such logomachist trickery offends me aesthetically, so I must take care to refrain from bandying words like 'fool'."
- "Unfortunately, defining my bank account as such a place that contains millions of pounds would not mean that a careful understanding of that definition of ‘my bank account’ would really make it so. In order to see if that definition were true, we would have to go to an ATM and check the balance of my account and see if it is accurate. Similarly, a definition of God must be checked with reality to see if it is correct."
The concept God is equated with the greatest conceivable being. This confuses two separate issues: "If compared to every other object, God is greater" and "the greatest thing is arbitrarily labelled God". Of course, one could argue that a "greatest object" must necessarily exist. However, the argument changes the usage of "God" to the former definition. The argument therefore commits the use-mention error. 
Is God's existence possible?
This argument requires us to actually conceive of an infinite being. This is arguably beyond human capability as we are only conceiving of approximations of perfection. Also, if this conception of God has internal contradictions, then no being could distinctly conceive of it. Many religious traditions hold that God is beyond human conception. Just because we can conceive of a perfect circle, this does not imply a perfect circle exists in reality. Perhaps perfection and existence are incompatible attributes. 
We can only clearly conceive of things at that are possible. The ontological argument implicitly assumes that a maximally great being is possible. However, the apologist has not shown that such a being is possible (i.e. it is an unsupported hidden premise).
- "To refute this Premise, one would need to show that the very concept of an infinitely great being is somehow logically incoherent—like a “married bachelor.” Since no argument to that effect has been forthcoming, however, it follows necessarily and inescapably that “Therefore, a maximally great being exists.”"
This is shifting the burden of proof: it is up to the apologist to show the premises are true.
Descartes' existence is a perfection argument
- "But if the mere fact that I can produce from my thought the idea of something entails that everything which I clearly and distinctly perceive to belong to that thing really does belong to it, is not this a possible basis for another argument to prove the existence of God? Certainly, the idea of God, or a supremely perfect being, is one that I find within me just as surely as the idea of any shape or number. And my understanding that it belongs to his nature that he always exists is no less clear and distinct than is the case when I prove of any shape or number that some property belongs to its nature"
- My conception of God is of a perfect being
- My conception of God includes existence since this is more perfect than non-existence.
- I cannot conceive of God not existing.
- Therefore, God exists.
This essentially is wishful thinking.
Modal ontological argument
This is a version of the argument defended by such apologists as Alvin Plantinga. The argument is as follows:
- P(1): God is defined as a being with maximal greatness, including necessary existence in all possible worlds (i.e. God is not contingent).
- P(2): It is possible that God exists.
- P(3): If it is possible that God exists, then God exists in some possible worlds.
- P(4): If God exists in some possible worlds, then God (necessarily) exists in all possible worlds.
- P(5): If God exists in all possible worlds, then God exists in the actual world.
- P(6): If God exists in the actual world, then God exists.
- C(1): Therefore, God exists.
The Modal Ontological Argument is a deductive argument, which means that in order to deny the conclusion of the argument one must show the form of the argument to be invalid, that at least one of the premises are false, or that the argument commits some other fallacy.
As a way to show the argument contains a fallacy, one could substitute something like a necessarily existing unicorn into the argument instead of God.
- P(1)': Let use define a unicorn as an equine necessarily existent being with one horn.
- P(2)': It is possible that a necessarily existent unicorn exists.
- P(3)': If it is possible that a necessarily existing unicorn exists, then a necessarily existing unicorn exists in some possible worlds.
- P(4)': If a necessarily existing unicorn exists in some possible worlds, then a necessarily existing unicorn exists in all possible worlds.
- P(5)': If a necessarily existing unicorn exists in all possible worlds, then a necessarily existing unicorn exists in the actual world.
- P(6)': If a necessarily existing unicorn exists in the actual world, then a necessarily existing unicorn exists.
- C(1)': Therefore, a necessarily existing unicorn exists.
Of course, P(2)' claiming "a necessarily existent being that possibly exists" begs the question; it builds in necessary existence into the being in question from the beginning. The same fallacy is in P(2). In the original argument the question begging is, maybe, not quite as obvious, but the necessity of the existence of God is what causes P(4) to be purportedly true.
Another way to debunk the argument could be to attempt to show that "it is possible that God exists" in P(2) is false, or its truth cannot be determined. Since the apologist has defined God with a very particular set of properties, including necessarily existing, we cannot be sure this type of entity is possible at all. The burden of proof is on the apologist and such a proof probably would make this argument redundant. No evidence has been presented that a god as defined in this argument possibly exists. Another way to argue against this premise is the argument from incompatible attributes and the related omnipotence paradox.
Another problem is the argument claims "X is possible" then follows logic to "X is so". This is not logically coherent because the possible existence of an entity cannot tell us about its actual existence. In other words, modal logic is being misapplied when used with necessarily existent beings. Only contingent things can be said to "possibly exist" and the apologist has defined God to be non-contingent.
Another way to debunk the argument would be to point out that the argument relies upon equivocation between different definitions of "possible". Modal logic (which is used in P(3), P(4), and P(5)) refers to subjunctive possibility, while P(2) refers to epistemic possibility, which is not used in modal logic.
This is also a proof by logic which cannot demonstrate anything about actual existence.
"Our verdict on these reformulated versions of St. Anselm's argument must be as follows. They cannot, perhaps, be said to prove or establish their conclusion. But since it is rational to accept their central premise, they do show that it is rational to accept that conclusion"
- — Alvin Plantinga
Also, the argument uses a definition of God that could be incorrect. Although not traditionally accepted, God could be contingent or a brute fact.
Reverse modal ontological argument
The Modal Ontological argument depends upon the innocence of the first premise. One might be inclined to accept that it is merely possible that God exists but then be surprised you've agreed to too much. Modal logic cuts both ways though. An equally innocent premise can lead to the opposite conclusion:
- P(1) It is possible that God does not exist, i.e. there is some possible world where God does not exist.
- P(2) God is defined as a necessary being, i.e. exists in all possible worlds.
- P(3) If there is one possible world where God does not exist, then there is no possible world in which God exists in all possible worlds.
- P(4) If there is no possible world in which God exists in all possible worlds, then it is impossible that God exists.
- C(1) It is impossible that God exists.
P(1) is the innocent enough premise, that God might not exist. P(2) is the definition of God borrowed from the theist. P(3) follows from S5 modal logic where all worlds are accessible to each other, so if something is possible in one world, it is possible in all worlds. Logical possibility and necessity is generally thought to be captured by S5 modal logic. It is also the simplest modal logic and most often encountered. The Modal Ontological Argument above depends upon S5 as well. P(4) is just a translation: "No possible world" means "is impossible", and "exists in all possible worlds" means "exists", at least according to P(2).
- ↑ 1.0 1.1 Stanford Encyclopaedia of Philosophy, Ontological Arguments, substantive revision Jul 15 2011 
- ↑ The Critique of Pure Reason
- ↑ 
- ↑ 
- ↑ 5.0 5.1 5.2 
- ↑ Gasking's Proof 
- ↑ The God Delusion
- ↑ 
- ↑ 
- ↑ 
- ↑ 
- ↑ 
- ↑ 
- ↑