Earnings per share (EPS) is calculated by dividing the net income by the number of outstanding shares. It represents the portion of a company's profit allocated to each share of common stock.