A measurement of the total pp cross section at the LHC at s=8 TeV is presented. An integrated luminosity of 500 μb−1was accumulated in a special run with high-β⋆beam optics to measure the differential elastic cross section as a function of the Mandelstam momentum transfer variable t. The measurement is performed with the ALFA sub-detector of ATLAS. Using a fit to the differential elastic cross section in the −t range from 0.014 GeV2to 0.1 GeV2to extrapolate t→0, the total cross section, σtot(pp→X), is measured via the optical theorem to beσtot(pp→X)=96.07±0.18(stat.)±0.85(exp.)±0.31(extr.)mb, where the first error is statistical, the second accounts for all experimental systematic uncertainties and the last is related to uncertainties in the extrapolation t→0. In addition, the slope of the exponential function describing the elastic cross section at small t is determined to be B=19.74±0.05(stat.)±0.23(syst.)GeV−2.