It's a question that came up in discussion of this year's Fourth of July celebrations. Basically, is America 227 years old because the Constitution was fully ratified in 1790, or is America 241 years old since the Declaration of Independence was signed in 1776?
It really depends on how you define the term "birthday" in this context. Before the Constitution was signed we were still referring to ourselves as the "United States of America". But the Declaration was signed* (see below) two days after the Second Continental Congress actually voted for Independence.
John Adams, leader of the group pushing for Independence, wrote to his wife "The Second Day of July 1776 will be the most memorable Epocha, in the history of America. I am apt to believe I'm that it will be celebrated by succeeding generations as the great anniversary festival."
To further complicate matters, some scholars have used the various dates of September 3, 1783 (formal end to the American War of Independence and the date all parties including Spain, France and the Netherlands ceased negotiations on preliminary peace), or November 30 1782 (date of the agreement in Paris to end the war), or January 14, 1784 (date when Congress ratified the Treaty of Paris, England ratified the same on April 9 1784) as the "birthday". Formally, the war ended September 3, 1783.
The vast majority of scholars and people would cite July 4 as the birthday of the country though, and that is when we have celebrated it since basically the first Independence Day celebration, probably because July 4 was the date that actually appeared on printed copies of the Declaration after it's signing.
Interestingly, the copy on display at the National Archives that most people believe to be the original and official document was a sealed/engrossed copy ordered by Congress on July 19 1776 and wasn't signed until August 2.
*There remains some debate among scholars about when the physical document was signed. Adams, Jefferson and Franklin all wrote later they signed it that day (July 4), but many historians believe that it was signed August 2. Regardless, the names of those signing appeared with the printed copies dated July 4 and that was what stuck.