Shimano gives very specific information in their DM's for sizing chains. 1x, 2x and 3x can be different procedures depending on the group. I'd think SRAM has similar info published too.
Typically and for many years, wrapping the largest front and back without going through the rear DR and then adding 2 links has been the standard.
New chains do come longer than needed because they don't know what you are putting them on.