It is crucial to measure reaction cross sections relevant to the astrophysical gamma process so that theoretical reaction rates can be tested and validated with experimental data. The total cross sections for the Er-162(p,gamma)Tm-163 and the Er-162(p,n)Tm-162 reactions have been measured by the activation method in center-of-mass energies from 3.973 to 8.944 MeV and from 5.962 to 8.944 MeV, respectively. The nucleus Er-162 is the heaviest p nuclide to be measured by the activation method using gamma-ray spectroscopy, so far. It is important to note that the energy range for the (p, gamma) reaction measurement covers a large fraction of the astrophysically relevant energy region between 2.71 and 5.34 MeV. The targets were prepared by evaporating 28.2% isotopically enriched (Er2O3)-Er-162 powder onto carbon backing foils, and bombarded with proton beams provided by the FN Tandem Accelerator at the University of Notre Dame. The reaction yields have been determined by the observed activity of produced radioactive isotopes, which was detected offline by a high-purity germanium detector. The results are presented and compared with calculations from two statistical model codes: NON-SMOKER and TALYS.