The P/E ratio is calculated by dividing the company's market price per share by its earnings per share (EPS): P/E Ratio = Market Price per Share \\ Earnings per Share (EPS).