There are several methods for calculating a 1RM (1 Rep Max). At 1rm.io we supply several of them in our free calculator. This Wikipedia article does a good job of detailing several of the mathmatical functions behind each of the methods.
It's probably more important to find a calculation method and stick with it, than finding the perfect calculation method. When calculating your 1RM, or estimating the amount of weight you should use to approximate your 1RM, our calculator will allow you to select the method that you prefer.