I've said this story many times, but every time this question is asked, I feel compelled to tell it again.
When I was 17, I wanted to see how fast I could slam on my brakes, and NOT crash my car. The answer is 35mph because I crashed when doing it at 37mph.
Lesson: the only way to find out what your maximum dose is, is by going over it. I hope you never find out your maximum dose.
There may one day be a way to know the exact safe amounts based on specific conditions. I imagine a device that could check breathing rates, heart rates, tolerance, allergies, interactions, existing drugs in the system, as well as many other factors like liver health, temperature, etc, could be created to give this information. However when science & technology get to that point, it seems there would likely be drugs that are impossible to overdose on, that also have no negative side effects, so it would be a moot invention at any rate.
Still it is possible with current technology and scientific understanding to get a pretty accurate idea, it just isn't feasible for the average user to have access to it. Analyzing what an overdose is and what point it occurs could be a pretty simple process. If for example respiratory depression was the issue, breathing rates could somehow be recorded at various doses, then a limit could be reached and the information collected. With enough data from enough people, a computer program could then generate fairly accurate information as to what is the maximum safe dosage is, simply by inputting data like age, weight, tolerance levels* (*which would be require another large amount of data to realize), etc.
Yet, even with that data, you'd still have to consider the purity of each substance, which would drastically change results. In a sane world, all drugs would be legalized, pure, with information about them sold alongside each purchase, much how prescription drugs are already handled, but we sadly still live in the Dark Ages in this regard. No, much better to have a drug user purchase an unknown substance at difficult to know economic value, and utilize said substance without any knowledge about its effects, side effects, interactions, or even an idea as to how to use it properly and what doses are safe.
Again, I'll simply say that a maximum dose really isn't worth investigating, because the effects won't be drastically different from a lower dose, but the risks are much higher.