An ontological argument for the existence of God defines God as the greatest perfect being and states that He must exist because He would not be perfect or the greatest, if He remained only in thought. Anselm and Descartes proposed it, and Kant pointed out that this argument was wrong in deducing a synthetic judgment from an analytic one, but the real problem of this argument is that the greatest perfect being whose existence it proves is quite different from what Christians regard as God, namely the omniscient and omnipotent supreme being.
1. Critique of Anselm’s argument
It was Anselm of Canterbury (Born: 1033; Died: 1109) who first proposed the ontological argument for the existence of God. According to him even atheists who say God does not exist but understand what God is acknowledge that God exists in their understanding.
Hence, even the fool is convinced that something than which nothing greater can be conceived exists at least in the understanding. For, when he hears of this, he understands it. And whatever is understood exists in the understanding. And assuredly that, a being than which nothing greater can be conceived, cannot exist in the understanding alone. For, suppose it exists in the understanding alone: then another being which is greater than it can be conceived to exist also in reality. 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.
The Latin word maius that Anselm uses here is the comparative of a neutral adjective magnum. To use Hare’s terms, it has not only the descriptive meaning “large" or “big" but also the evaluative meaning “noble" or “important", just as the English adjective “great". Suppose maius has only the descriptive meaning “larger" and the god (let me use lowercase) is larger than anything in this meaning. The god is then the whole world including reality and understanding. Were it not for the god thus defined, there could be nothing that exists. As this is against the empirical fact, the god as the largest must exist.
The god whose existence the ontological argument proves is just the largest in the descriptive meaning and not the greatest in the evaluative meaning. If the god were the greatest in the evaluative meaning, it could be the omniscient and omnipotent supreme being. Generally speaking, however, it is not necessarily true that the larger the better. The ontological argument confuses the descriptive meaning with the evaluative and demonstrates the existence of the largest being that is different from God.
2. Critique of Descartes’ argument
René Descartes is the most famous of the modern successors of Anselm’s argument. He is different from Anselm in starting from the thinking ego that he thought of as the most certain being. According to Descartes God whose idea I have does not remain within me.
For though the idea of substance be in my mind owing to this, that I myself am a substance, it should not, however, be the idea of an infinite substance, seeing I am a finite being, unless it were given me by some substance in reality infinite.
He not only says that God is the substance that transcends ego but also that the unlimited substance is the cause of the limited and therefore has more reality.
Now, it is manifest by the natural light that there must at least be as much reality in the efficient and total cause as in its effect; for whence can the effect draw its reality if not from its cause ? And how could the cause communicate to it this reality unless it possessed it in itself? And hence it follows, not only that what is cannot be produced by what is not, but likewise that the more perfect, in other words, that which contains in itself more reality, cannot be the effect of the less perfect; and this is not only evidently true of those effects, whose reality is actual or formal, but likewise of ideas, whose reality is only considered as objective. 
If it were true, the unlimited substance (God) that produced ego would have even more reality than the limited substance (ego) whose reality is beyond doubt. Is this argument really valid?
Causes precede their effects in terms of time. The further you trace back to the past, the more uncertainties you face. In this sense causes have less reality than their effects. When it comes to the relation between ground and conclusion instead of that between cause and effect, you can say the former is more certain than the latter. Even if you adopt this interpretation, you cannot say God has more reality than ego, because the order of Descartes’ Meditations on First Philosophy suggests the existence of ego is the ground and that of God is the conclusion drawn from it. If the existence of God were the ground and that of ego were the conclusion, why had not Descartes first demonstrated the former before demonstrating the latter?
Defining a god as “first cause" or “prime mover" and demonstrating his existence in terms of the causal relationship is called the cosmological argument. Descartes tried to combine the ontological argument with the cosmological, but since Descartes thought the existence of God could be demonstrated like mathematical truth, he should not have resorted to the causal relation.
The cosmological argument is a topic of another page. Let’s focus on Descartes’ ontological argument. According to Descartes, God is so complete that its essence includes its existence.
Indeed such a doctrine may at first sight appear to contain more sophistry than truth. For, as I have been accustomed in every other matter to distinguish between existence and essence, I easily believe that the existence can be separated from the essence of God, and that thus God may be conceived as not actually existing. But, nevertheless, when I think of it more attentively, it appears that the existence can no more be separated from the essence of God, than the equality of its three angles to two right angles from the essence of a rectilinear triangle, or the idea of a mountain from that of a valley; so that it is not less impossible to conceive a God, that is, a supremely perfect being, to whom existence is awanting, or who is devoid of a certain perfection, than to conceive a mountain without a valley. 
Granted that the essence of something includes its existence, does it follow that the object of the essence really exists? The concept “existence" means existence and we can safely say that the essence of this concept includes existence, but as “existence" is an ideal concept, the ideal object of the concept itself cannot exist. Existing things can exist, but whether what I think exists really exists or not cannot be decided just by examining the concept of the subject. So, the concept “an existing thing" just refers to an existing thing as a possible object and does not prove that it really exists. Similarly the concept “the existing god" just refers to an existing god as a possible object and does not prove that it really exists.
Of course, Descartes defined God not as an existing thing but as “a supremely perfect being (ens summe perfectum)." Although the descriptive meaning of “perfect" without evaluative meaning is different from that without it, Descartes confused these two meanings in the name of the ambivalent word “perfect". As for the former there could be two meanings and therefore we can make the following two interpretations of why the supremely perfect being must exist.
- Perfect means boundless, that is to say, unlimitedly large. In this case, Descartes’ ontological argument is equal to that of Anselm.
- Perfect means complete with all sorts of predicates. In this case, the ontological argument is as follows: God has all predicates because perfect. Therefore He has the predicate “exist". So, God exists.
The second interpretation is no less problematic as the first one. If God had all predicates, He should also have such predicates as “imaginary" or “incomplete". Since most of predicates have their antonyms, God would be a being that includes all contradictions. If God tried to avoid contradiction, He would not be a supremely perfect being.
The first interpretation also incurs a similar problem. If God were so large as to include not only the entire real world but also the ideal world, contradicting thoughts in the ideal world would be united into one being, God. According to Hugh Everett’s many-worlds interpretation, the universe is a quantum superposition of infinitely many worlds. If we adopt this interpretation, contradicting quantum worlds would be united into one being, God. Thus God would be self-contradicting in both real and ideal worlds.
To sum up, which interpretation you may adopt, the supremely perfect being without the evaluative meaning has nothing to do with that with the evaluative meaning, namely the omniscient and omnipotent supreme being. Since intelligence and volition is based on selection of one among many possibilities, a whole being that embraces all possibilities and all predicates has the largest information entropy and cannot make any judgments. So, the supremely perfect being without the evaluative meaning is disorder that can neither know nor do anything – a being quite opposite to the omniscient and omnipotent supreme being.
3. Critique of Kant’s critique
Kant criticized the ontological argument in Critique of Pure Reason. According to him, the judgment, “God exists", is either analytic or synthetic, as every judgment is. In the former case the being of God remains within thought. In the latter case the truth of this judgment cannot depend solely on the law of contradiction and therefore the ontological argument that the judgment “God does not exist" is self-contradictory is invalid.
The conclusion of the ontological argument, at least that of Descartes, is not analytic. First of all the judgment cogito ergo sum, which Descartes regarded as the most certain, is not analytic. The world without ego is theoretically possible, but now that the existence of thinking ego is a fact, it is absolutely impossible to think that there is no thinking ego. So long as the ontological argument is based on the experience of Descartes, his judgment should be considered to be synthetic.
Descartes believed that the object of thought existed as the real world outside the thought, but even if this supposition were false, the real world would necessarily exist. Thought can be unreal so long as the real world exists outside the thought. If there were no real world outside thought, the world within the thought would be no longer a fiction. In short if all were dreams, the dreams would not be unreal dreams but reality. Since the whole world including ego has at least partially reality, the god defined as the whole world proves to exist.
Kant took money as an example to emphasis the absurdity of the ontological argument and distinguish real objects from possible concepts. According to Kant “be (sein)" is not a real predicate and adding it to the subject does not change its concept.
In my financial position no doubt there exists more by one hundred real dollars, than by their concept only (that is their possibility), because in reality the object is not only contained analytically in my concept, but is added to my concept (which is a determination of my state), synthetically; but the conceived hundred dollars are not in the least increased through the existence which is outside my concept.
Kant recapitulated his critique of the ontological argument as follows.
Time and labour therefore are lost on the famous ontological (Cartesian) proof of the existence of a Supreme Being from mere concepts; and a man might as well imagine that he could become richer in knowledge by mere ideas, as a merchant in capital, if, in order to improve his position, he were to add a few noughts to his cash account.
Kant’s argument of 100 dollars is famous. It is, however, not appropriate to refer to money in order to distinguish real objects from possible concepts. Kant probably thought of a silver coin of Thaler as the real object of money, but the essence of dollar consists not in the metal mass but the promise to exchange anything worth the assigned value with it in the future. If a sincere man promises you to give you a present worth 100 dollars, your financial position amounts to possessing 100 dollars although you do not possess any real objects. On the other hand even if you possess 100-dollar coins as real objects, they will become mere metal mass when the government that issues them collapses. So, money is originally a possible concept rather than a real object.
Of course, I cannot make the possible concept of 100 dollars my property by just wishing I had 100 dollars. Still whether I possess 100 dollars or not depends not on whether they are real objects or possible concepts but on whether the possession is intersubjectively approved or not. Likewise whether a god exists or not depends not on whether it is a real object or a possible concept but on whether the god is intersubjectively approved or not.
Etymologically “exist" means “stand outside", ex-sistere in Latin. Anselm, Descartes and Kant assumed the existence of the god to be standing outside consciousness, but what is important for the god to function as God and necessary to transcend the mere possible concept is to stand outside the consciousness of an individual person, that is to say, stand inside the social consciousness. The god does not need to stand outside the social consciousness.
It does not follow that religion must confine itself inside consciousness. Believers of a god often create its idol and worship it. The idol, however, just symbolizes the god and it is not the god itself. Similarly money is represented by a piece of metal or paper. Such a token just symbolizes money and it is not money itself. The essence of a god or a currency does not lie in any real object. When everyone stops believing in the god or the currency, it disappears and the real object that symbolized it becomes just a thing.
Both god and money have function of redressing the imbalance in exchange. So long as money is trusted, money can redress the imbalance of production and consumption in terms of assets or debts. So long as the god is trusted, he can redress the imbalance of good and bad conducts in terms of grace or punishment.
Grace or punishment should originally be carried out by secular powers. They are, however, neither omniscient nor omnipotent and as a result a good person often becomes unhappy while a bad person can become happy. To maintain moral order, a supreme being is required that is omniscient enough to observe every conducts and omnipotent enough to fulfill complete grace and punishment. This is why the god, the omniscient and omnipotent supreme being, is socially necessary.
The unlimitedness of god no more requires that he should be the whole world than the universal exchangeability of money requires that money should be identical with the entire commodities. Although money was one of commodities that had value for a specific usage at the primitive stage of economy, it has evolved into a universal medium without any intrinsic value since the birth of fiat money. Although a god was one of real objects at the primitive stage of religion, he has evolved into a universal medium without any visible reality since the birth of Judaism.
Kant gave up theoretically demonstrating the existence of God and morally postulated the existence of God so that those who abide by moral laws could be happy. Now that Kant regarded God as such, he should have ascribed the error of the ontological argument not to the confusion of an analytic judgment with a synthetic one but to identifying what is not God with God.
- “Convincitur ergo etiam insipiens esse vel in intellectu aliquid quo nihil maius cogitari potest, quia hoc, cum audit, intelligit, et quidquid intelligitur, in intellectu est. Et certe id quo maius cogitari nequit, non potest esse in solo intellectu. Si enim vel in solo intellectu est, potest cogitari esse et in re; quod maius est. Si ergo id quo maius cogitari non potest, est in solo intellectu: id ipsum quo maius cogitari non potest, est quo maius cogitari potest. Sed certe hoc esse non potest. Existit ergo procul dubio aliquid quo maius cogitari non valet, et in intellectu et in re." Anselm of Canterbury. “Quod vere sit Deus" in Anselmus Cantuariensis Proslogion. Hackett Publishing Co. (February 17, 2012). 2.
- R. M. Hare. The Language of Morals. Oxford University Press, U.S.A.; Reprint (1991/5/9). p. 111-126.
- “Nam quamvis substantiae quidem idea in me sit ex hoc ipso quòd sim substantia, non tamen idcirco esset idea substantiae infinitae, cùm sim finitus, nisi ab aliquâ substantiâ, quae revera esset infinita, procederet." René Descartes. Meditationes de prima philosophia. University of Notre Dame Press; 1st edition (January 30, 1990). Meditatio III, 23.
- “Jam verò lumine naturali manifestum est tantumdem ad minimum esse debere in causâ efficiente & totali, quantum in ejusdem causae effectu. Nam, quaeso, undenam posset assumere realitatem suam effectus, nisi a causâ? Et quomodo illam ei causa dare posset, nisi etiam haberet? Hinc autem sequitur, nec posse aliquid a nihilo fieri, nec etiam id quod magis perfectum est, hoc est quod plus realitatis in se continet, ab eo quod minus. Atque hoc non modo perspicue verum est de iis effectibus, quorum realitas est actualis sive formalis, sed etiam de ideis, in quibus consideratur tantùm realitas objectiva." René Descartes. Meditationes de prima philosophia. University of Notre Dame Press; 1st edition (January 30, 1990). Meditatio III, 14.
- “Quanquam sane hoc primâ fronte non est omnino perspicuum, sed quandam sophismatis speciem refert. Cùm enim assuetus sim in omnibus aliis rebus existentiam ab essentiâ distinguere, facile mihi persuadeo illam etiam ab essentiâ Dei sejungi posse, atque ita Deum ut non existentem cogitari. Sed tamen diligentius attendenti fit manifestum, non magis posse existentiam ab essentiâ Dei separari, quàm ab essentiâ trianguli magnitudinem trium ejus angulorum acqualium duobus rectis, sive ab ideâ montis ideam vallis: adeo ut non magis repugnet cogitare Deum (hoc est ens summe perfectum) cui desit existentia (hoc est cui desit aliqua perfectio), quàm cogitare montem cui desit vallis." René Descartes. Meditationes de prima philosophia. University of Notre Dame Press; 1st edition (January 30, 1990). Meditatio V, 8.
- AndreasToerl. “Statue of Immanuel Kant in Kaliningrad State University area, Kaliningrad, Russia. Replica by Harald Haacke of the original by Christian Daniel Rauch lost in 1945..” Licensed under CC-BY-SA.
- Immanuel Kant. Kritik der reinen Vernunft. 2. Aufl. 1787. p. 400. Reprinted: Felix Meiner Verlag (July 1, 1998).
- “Aber in meinem Vermögenszustande ist mehr bei hundert wirklichen Talern, als bei dem bloßen Begriffe derselben, (d. i. ihrer Möglichkeit). Denn der Gegenstand ist bei der Wirklichkeit nicht bloß in meinem Begriffe analytisch enthalten, sondern kommt zu meinem Begriffe (der eine Bestimmung meines Zustandes ist) synthetisch hinzu, ohne daß durch dieses Sein außerhalb meinem Begriffe diese gedachten hundert Taler selbst im mindesten vermehrt werden." Immanuel Kant. Kritik der reinen Vernunft. 2. Aufl. 1787. p. 401. Reprinted: Felix Meiner Verlag (July 1, 1998).
- “Es ist also an dem so berühmten ontologischen (cartesianischen) Beweise vom Daseyn eines höchsten Wesens aus Begriffen alle Mühe und Arbeit verloren, und ein Mensch möchte wol eben so wenig aus blossen Ideen an Einsichten reicher werden, als ein Kaufmann an Vermögen, wenn er, um seinen Zustand zu verbessern, seinem Cassenbestande einige Nullen anhängen wollte." Immanuel Kant. Kritik der reinen Vernunft. 2. Aufl. 1787. p. 403. Reprinted: Felix Meiner Verlag (July 1, 1998).
- Thaler is the origin of dollar and it was used in Germany those days.
- Immanuel Kant. Kritik der praktischen Vernunft. 1787. p. 124. Reprinted: Felix Meiner Verlag; 1 edition (September 1, 2003).