Nine of the original thirteen states had to ratify the Constitution for it to take effect.

What Article VII Says

Article VII of the U.S. Constitution sets the rule for when the new framework of government would officially begin.

It states that the ratification of the conventions of nine states would be “sufficient for the establishment of this Constitution between the States so ratifying the same.”

Why It Was Nine, Not Thirteen

Under the Articles of Confederation, major changes technically required unanimous consent of all thirteen states, which was very hard to achieve.

The Framers instead chose nine states—about two-thirds of the total—so that the new system could start operating even if a few states initially refused to join.

What Happened In Practice

State ratifying conventions were held in each of the thirteen states, and once nine had approved, the new government could go into effect among those ratifying states.

In reality, more than nine eventually ratified, and the remaining states later joined under the procedure Article VII allowed.

TL;DR: The Constitution did not need all thirteen original states—only nine had to ratify it for the new government to begin operating.

Information gathered from public forums or data available on the internet and portrayed here.