Combining the electrostatic pressure with the osmotic pressure of the microgel from a Flory-Rehner-based theory, we are able to determine the equilibrium size together with the net charge of the microgel as a function of the reservoir pH and salt concentration, as well as other system parameters such as microgel concentration and polymerization degree. The presented model is an extension of the work in Ref. , which is based on the seminal work of Denton and Tang. Moreover, we perform coarse-grained, particle-based simulations that combine molecular dynamics for the configurational degrees of freedom with the grandreaction method to model the chemical reactions. This allows us to test our theory for a very wide range of pH values and salt concentrations. Finally, we compare our model with experimental measurements of the swelling of microgels with weak acid sites for varying pH and salt concentration.