Discovering new materials for energy storage requires reliable and efficient protocols for predicting key properties of unknown compounds. In the context of the search for new organic electrolytes for redox flow batteries, we present and validate a robust procedure to calculate the redox potentials of organic molecules at any pH value, using widely available quantum chemistry and cheminformatics methods. Using a consistent experimental data set for validation, we explore and compare a few different methods for calculating reaction free energies, the treatment of solvation, and the effect of pH on redox potentials. We find that the B3LYP hybrid functional with the COSMO solvation method, in conjunction with thermal contributions evaluated from BLYP gas-phase harmonic frequencies, yields a good prediction of pH = 0 redox potentials at a moderate computational cost. To predict how the potentials are affected by pH, we propose an improved version of the Alberty-Legendre transform that allows the construction of a more realistic Pourbaix diagram by taking into account how the protonation state changes with pH.