Nitrogen (N 2 ) and oxygen (O 2 ) are important impurities obtained from carbon dioxide (CO 2 ) capture procedures. Thermodynamic modeling of CO 2 -N 2 -O 2 -brine-minerals is important work for understanding the geochemical change of CO 2 geologic storage with impurities. In this work, a thermodynamic model of the CO 2 -N 2 -O 2 -brine-carbonate system is established using the "fugacity-activity" method, i.e., gas fugacity coefficients are calculated using a cubic model and activity coefficients are calculated using the Pitzer model. The model can calculate the properties at an equilibrium state of the CO 2 -N 2 -O 2 -brine-carbonate system in terms of gas solubilities, mineral solubilities, H 2 O solubility in gas-rich phase, species concentrations in each phase, pH and alkalinity. The experimental data of this system can be well reproduced by the presented model, as validated by careful comparisons in conditions from surface to high temperature and pressure. The model established in this work is suitable for CO 2 geologic storage simulation with N 2 or O 2 present as impurities.Thermodynamic modeling of CO 2 -impurities-brine systems is essential work for understanding subsurface fluid transport. It mainly consists of the modeling of phase partitioning, density and viscosity. Soreide and Whitson [7] constructed mutual solubility of multi-gases (including CO 2 , CH 4 , H 2 S and N 2 ) and brine systems. The model shows good accuracy at low temperature and pressure with a salinity less than 2 (molal). Li et al. [3] made modifications and achieved good accuracy at wider ranges of temperature, pressure and salinity for CO 2 -CH 4 -H 2 S-brine systems. Gas solubility modeling of CO 2 , N 2 and O 2 in water and brine has been performed by Duan and Sun [8], Mao and Duan [9] and Geng and Duan [10] based on comprehensive reviews of experimental data. These models can reproduce most of the experimental data over wide ranges of temperature, pressure and salinity. However, they can only consider single gas component cases, and cannot calculate multi-gas and brine system equilibria. Tan et al.[11] developed a model for CO 2 , SO 2 and brine system equilibria using a "cubic plus association" (CPA) method. Sun and co-workers developed an improved "Statistical Associating Fluid Theory" (SAFT) model for CO 2 -brine and water-hydrocarbon systems by introducing a Lennard-Jones (LJ) term (SAFT-LJ models, [12][13][14]). CPA and SAFT type models usually have high computation accuracy, but are time-consuming and are not practical for reservoir simulation implementations.Carbonates (including calcite, magnesite and dolomite) are important minerals for CO 2 geologic storage.When CO 2 is injected into porous media with carbonate minerals, dissolution of carbonates into aqueous phase is enhanced. Water property (such as pH, ion concentration, density and viscosity), porosity and permeability are affected consequently. Thermodynamic modeling work for CO 2 -brine-mineral systems began in the 1980s. Harvie and Weare [15] and Harvie et al. ...