Rene Descartes (1596-1650) proposed several versions of the ontological argument, the clearest of which is contained in his fifth Meditation and develops Anselm's argument in Proslogion 3.
1. I have an idea of a supremely perfect being
2. Necessary existence is a perfection
3. Therefore a supremely perfect being exists
For Descartes the concept of God entails existence in the way that the concept of a triangle entails three sides, three angles and 180 degrees, in the way that the concept of a hill entails valleys. God de dicto exists. Essentially Descartes argument tries to demonstrate equivalence between the words "‘God", "perfection" and "existence". In the same way that the number 4 can be written alternatively as 1+1+1+1, 2+2 or 2x2, for Descartes the ontological argument just shows that the three terms necessarily relate. Note that Descartes starts from the confident assertion that one can know the essential nature of God.
On some occasions Descartes claims that his "argument" is simply a self-evident axiom, grasped intuitively by a mind free from philosophical prejudice. 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.' One interesting question is to consider what Descartes really means by existence. As a rationalist philosopher, he sees truth being reached through the operations of the mind and dismisses sense data as potentially flawed and limited. God exists for Descartes in the way that a number exists – I can't photograph the number 2 in the wild but I can see how it applies to other things and I can reasonably say that the number is real or exists. God, the principle of supreme perfection, is as undeniable as any mathematical truth – but I can't see or touch (or photograph) it in itself. For Descartes that idea of God is a necessary feature of our understanding which makes other judgments possible.
Descartes, like Anselm, concludes that denying God's existence is denying an essential predicate of his nature. The atheist is a fool because he/she asserts "God, who exists, does not exist" – as nonsensical as talking of two-sided triangles or flat hills. This claim, that existence can be seen as an essential predicate of anything, is the focus of the criticisms of the classical argument levelled by Kant and later Russell.
Leibniz's principle of non-contradiction
In the early eighteenth century, Gottfried Leibniz (1646-1716) attempted to fill what he took to be a shortcoming in Descartes' view. Descartes' argument focused on a psychological question, whether the idea of God entailed his existence, whether a clear and distinct understanding of God would make accepting His existence inescapable. Leibniz' argument focused instead on the logical possibility of God's necessary existence. According to Leibniz, Descartes' arguments fail unless one first shows that the idea of a supremely perfect being is coherent, or that it is logically possible for there to be a supremely perfect being.
Leibniz set himself the task of proving that there is no contradiction within the concept of a supremely perfect being. Leibniz developed "the principle of non-contradiction", that is that a concept is valid, possible, true and real if it does not contain contradictions. For example the concept of a married bachelor is nonsensical, or a square circle. Square circles are impossible and not real. He made a distinction between what he took to be flawed concepts, such as the highest number and the greatest speed, and those concepts of perfection which he maintained to be possible. He argued that all possible perfections are simple, unanalyzable, and thus ultimately compatible. They can all be drawn together within a single possible concept of supreme perfection.
Leibniz argued that existence is a perfection and that supreme perfection would entail infinite existence. Leibniz, like Descartes, was a rationalist. He believed that ultimate reality is metaphysical. His argument sought to demonstrate that God's necessary existence, as a concept, contained no contradictions and thus is logically possible. If the idea is possible and the idea relates God's nature with formal existence, then God must formally exist.