Thousands of couples and years of research yield one simple formula to calculate the magic of making it work.