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.
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
Existence can hardly ever be considered an attribute, 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 circular reasoning because the existence is built into the assumptions.
Here are some examples of this proof that highlight the fallacy.
- Let us define a unicorn as a magical equine being that has one horn, and that exists.
- By that definition, such a being must necessarily exist.
- Therefore unicorns exist.
- Shangri-La is the greatest place on earth.
- A place that exists is greater than one that doesn't.
- Therefore, Shangri-La exists.
- Hercules is the greatest warrior in history.
- A warrior that existed is greater than one that did not.
- Therefore, Hercules existed.
- 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 invalid. 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.
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
Proof by logic
- Main Article: Proof by logic
The argument effectively defines God into existence without considering factual evidence.
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. 
Modal ontological argument
This is a version of the argument defended by such apologists as Alvin Plantinga. The premises are as follows:
- P(1): It is possible that God exists.
- P(2): If it is possible that God exists, then God exists in some possible worlds.
- P(3): If God exists in some possible worlds, then God exists in all possible worlds.
- P(4): If God exists in all possible worlds, then God exists in the actual world.
- P(5): 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)': It is possible that a necessarily existing unicorn exists.
- P(2)': If it is possible that a necessarily existing unicorn exists, then a necessarily existing unicorn exists in some possible worlds.
- P(3)': If a necessarily existing unicorn exists in some possible worlds, then a necessarily existing unicorn exists in all possible worlds.
- P(4)': If a necessarily existing unicorn exists in all possible worlds, then a necessarily existing unicorn exists in the actual world.
- P(5)': If a necessarily existing unicorn exists in the actual world, then a necessarily existing unicorn exists.
- C(1)': Therefore, a necessarily existing unicorn exists.
The expected objection is that P(1)' begs the question; it builds in necessary existence into the being in question from the beginning. The counter is that P(1) from the original modal argument does the same thing with the idea of God as a necessary being. 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(3) to be purportedly true.
Another way to debunk the argument could be to attempt to show P(1) is false. To show that it is impossible that God exists you would need to show that the properties of God are logically incoherent, and therefore, God would not exist in any possible world.
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(2), P(3), and P(4)) refers to subjunctive possibility, while P(1) refers to epistemic possibility, which is not used in modal logic.
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).
- ↑ Stanford Encyclopaedia of Philosophy, Ontological Arguments, substantive revision Jul 15 2011 
- ↑ Gasking's Proof 
- ↑