Nine states had to ratify the U.S. Constitution before it could take effect among the ratifying states.
Article Seven established this threshold, replacing the Articles of Confederation's requirement for unanimous state approval. The framers chose nine of the 13 states, a two-thirds majority, to avoid allowing one state to block the new governmental framework.
Delaware became the first state to ratify, on December 7, 1787. New Hampshire became the ninth on June 21, 1788, making the Constitution operative under Article Seven. Virginia and New York ratified soon afterward, strengthening the new union, while North Carolina and Rhode Island initially remained outside it.
The Constitution did not require all 13 states to ratify before the federal government began. North Carolina ratified in 1789, and Rhode Island ratified in 1790. This is why nine, rather than 13, is the canonical answer.