How to space sprockets perfectly

We have always struggled with spacing our sprockets at such a distance so that the chain is neither to tight nor too loose.
Is there some sort of formula or guide to space them so that the chain sits perfectly with the right amount of slack?

I start by getting enough chain to where there is 0 slack. Then I add an extra link or 2 depending on the system.

If you can’t find that perfect chain length you can make it an extra link or two long and then use tensioners.

I recommend using tensioners whenever you can. A simple axle with spacers on it to slightly bend the chain out of its normal path should change the length a sufficient amount to find the exact link length. Additionally, you can use two of of these slide rails.png with bearings lightly attached holding an axel between them, and create your very own sliding chain tensioner, which can allow you an easier time putting chain on or taking it off, and allow you to vary the amount of chain tension on the fly.

When I read this I thought of the Jetsons.