How do you know your shoe size? You either get measured for it, or you try on different shoes until you find a size that fits. Over the years I've learned what length of pull I need, but I still carry a small tape when I'm looking at guns. If I put the rifle to my shoulder and it fits, I'll measure the pull to identify the length of that particular rifle.
Each make and model is a little different, based on the individual stock measurements, but I've learned over the years that I like a 13" length of pull. Then I've got to worry about comb drop and other issues that affect the use of a long gun. Stock fit is more critical in shotgunning than in rifle work, but a stock that fits is a joy to use, whether you're using a rifle or a shotgun.