The Second Continental Congress passed the Lee Resolution declaring independence on July 2, 1776.
The resolution stated that the United Colonies should be free and independent states. Richard Henry Lee of Virginia introduced it after the Virginia Convention instructed him to propose independence. Its approval represented the formal decision to separate from Great Britain, although Congress still needed to prepare and approve a public explanation.
That explanation became the Declaration of Independence, which Congress adopted on July 4. The two dates are therefore connected but not interchangeable. John Adams believed July 2 would become the major anniversary because it marked the actual independence vote. In later American tradition, however, July 4 became the celebrated date because it commemorated adoption of the Declaration’s text.