I've often heard it said that gravity is much weaker than electromagnetism, and after looking at several questions on SE, I feel that I've got at least a qualitative handle on the concept -- gravity only appears to be stronger macroscopically because positive and negative charges in most everyday matter cancel each other out almost perfectly, leading to low Coulomb forces.
But I've also heard it said that gravity is "thirty orders of magnitude" weaker than EM. How is that figure arrived at, since charge and mass are pretty fundamentally different, at least from what I've learned?
This differs from this question because I'm looking for a quantitative and hopefully more complete understanding of the issue than the answers to that question provided. The closest any of those answers come is vaguely mentioning a coupling constant, without really explaining its nature mathematically.