Calculate the earnings per share (EPS) of a company, an important metric for measuring profitability on a per-share basis.