For 1x, without a formula, I usually wrap the chain around the big cog and crank and hold in place to see where the derailer looks good. Mark the link with a twist tie and wrap around the small cog. If it eye balls ok I then remove the left over chain, erring on the side of too long and connect it together. Then I fine tune. As Mack says, if it winds up a bit loose it's easy to remove an additional link or two.