Use at least 1 liter of water per 100g of spaghetti.
Yes, 100g per 1L is a good baseline. But I’d go a little higher if you can — 1.5L per 100g is even better and still not wasteful.
The reason pasta sticks is starch. Too little water means the starch concentration gets high, and the noodles basically glue themselves together as they cook. More water dilutes that starch, giving each strand room to move. A rolling boil also helps because it physically agitates the pasta.
You don’t need a scientific scale. For a standard 500g box, use a big pot and fill it about ⅔–¾ full. That’s roughly 4-5 liters. Salt the water heavily after it boils (about 1 tbsp per 4L) — salt helps with texture, not just flavor.
One more thing: stir right after you drop the pasta, then again after a minute. That’s more important than exact ratios for preventing clumps.
More water is cheap insurance. Your pasta deserves it.
