The database presents the results of numerical estimation of absolute permeability and open porosity for four sandstone samples (sample7, sample25, sample31, sample78) and four carbonates (sampleAH, sample AL, sampleBH, sampleBL). The carbonates are considered at three different stages of CO_2 injection. To measure the permeability, each sample was divided into several subsamples. Each file contains the measurements of total porosity, open porosity, and permeability along each spatial direction for all subsamples. The structure of the files is 1 number of subsamples 4 bytes (N), porosity N*8 bytes, open porosity in X direction N*8bytes, open porosity in Y direction N*8bytes, open porosity in Z direction N*8bytes, permeability in X direction N*8bytes, permeability in Y direction N*8bytes, permeability in Z direction N*8bytes. In addition, readData_Mendeley.m is provided, which reads the data.