How to calculate your one rep max
You can estimate a one rep max from any hard set without ever testing a single. Here is how the formulas work, where they disagree, how effort changes the answer, and which number to actually train off.

The short version
Take a set you did close to failure. Multiply the weight by a factor based on how many reps you managed. The two formulas in common use are:
Epley: 1RM = weight × (1 + reps ÷ 30)
Brzycki: 1RM = weight × 36 ÷ (37 − reps)
Say you squat 80 kg for 6 reps, the last one grinding. Epley gives 80 × 1.2 = 96 kg. Brzycki gives 80 × 36 ÷ 31 = 92.9 kg. So your one rep max is somewhere around 93 to 96 kg, and the gap between the two is the honest measure of how precise this can be.
Once you have that number you also have every rep max below it. A 95 kg estimate implies roughly 90 kg for a double, 87 kg for a triple, 82 kg for a set of five, and 72 kg for a set of ten.

Why the formulas disagree
There are more than two. The ones with a real research history behind them are Epley (1985), Brzycki (1993), Lombardi (1989), Mayhew (1992), McGlothin (1984), O'Conner (1989) and Wathan (1994). Every one of them is a curve fit to population averages, not a law.
Run that same set of 6 at 80 kg through four of them and you get 96 kg from Epley, 92.9 kg from Brzycki, 95.7 kg from Lombardi and 96.3 kg from Wathan. Average those and you land on 95 kg, which is a more defensible number than any single formula, because averaging cancels out the direction each one happens to lean.
Below about six reps they all agree closely. Above ten, rep performance depends increasingly on conditioning, pain tolerance and muscle fiber makeup rather than pure strength, so a single-rep prediction from a set of fifteen is close to guesswork. Whichever approach you take, keep it fixed. The value is in comparing your own numbers over time, not in the absolute figure.

How hard the set felt changes the answer
The formulas assume you went to failure. Almost nobody does, and a set of 6 you could have taken to 8 is not the same set at all.
Rate of Perceived Exertion fixes this. It is a 1 to 10 scale where the number is really a statement about reps in reserve: 10 means nothing left, 9 means one more rep, 8 means two, and so on down in half-point steps. Log the set with an RPE and the estimate is calculated from the reps you could have done, not just the ones you did.
It moves the number more than you would expect. That same 80 kg for 6 comes out at 95 kg when it was a true grinder at RPE 10, and 100 kg when you stopped with two in the tank at RPE 8. If you never train to failure and you ignore RPE, you have been underestimating yourself by about five percent for years.

The percentage table you actually train off
Most programs are written as percentages of a one rep max. Once you have an estimate:
- 95%: a heavy single or double
- 90%: sets of 2 to 3
- 85%: sets of 4 to 5
- 80%: sets of 6 to 8
- 70%: sets of 10 to 12
- 60%: warm-ups and technique work
It is worth having the percentages above 100% too. Overload work, partials and rack pulls are usually prescribed somewhere between 105 and 125%, and doing that arithmetic in your head between sets is how you end up loading the wrong bar.
These are approximations as well. If 85% does not feel like a five rep set, trust the bar over the arithmetic and adjust your estimate down.

Should you ever test a true max?
If you compete, yes. You need to know what happens under a real single, with the nerves and the commands and the third attempt you are not sure about.
Otherwise it is rarely worth the fatigue and the risk. An estimate from a heavy set of three to five gives you everything you need to program, costs nothing extra, and can be updated every session. Do that for a few months and the trend line tells you far more than one tested single ever would: whether you are still adding weight, when a lift stalled, and how much you actually gained since you started.
A tested max is one data point. A logged estimate is a graph.

Do it automatically
Our One Rep Max app does all of this: seven formulas you can mix and average, RPE adjustment, rep maxes from 2 to 11, and a percentage table you can step through in 1, 5 or 10 percent increments. Tap any number in it and you get the plates to load on each side of the bar. Log the set and it charts every lift over time. It is free on iPhone and Android.