You calculate the earnings per share by dividing the amount of the earnings a company reports in a year by the number of shares it currently has outstanding.
Thus, if XYZ has 1 crore shares outstanding and has earned 100 crores in the last year, it has an EPS of Rs.100.
EARNINGS PER SHARE = NET PROFIT IN A FINANCIAL YEAR / NO OF SHARES OUTSTANDING