Open circuit voltage of vanadium redox flow batteries is carefully calculated using equilibrium thermodynamics. This analysis reveals some terms in the Nernst relation which are usually omitted in literature. Due to the careful thermodynamic treatment, all uncertainties about the form of Nernst relation are removed except for uncertainties in activity coefficients of particular species. Moreover, it is shown (based again on equilibrium thermodynamics) that batteries with anion-exchange membranes follow different Nernst relation than batteries with cation-exchange membranes. The difference is calculated, and it is verified experimentally that the formula for anion-exchange membranes describes experiments with anion-exchange membranes better than the corresponding formula for cation-exchange membranes. In summary, careful thermodynamic calculation of open circuit voltage of vanadium redox flow batteries is presented, and the difference between voltage for anion-exchange and cation-exchange membranes is revealed.