I need help calculating Earnings Per Share and Diluted Earnings Per share with options

Earnings per share (EPS) is the earnings of a company divided by the number of common stock shares held. "Diluted earnings per share with options" are obtained by dividing the same corporate earnings by (1) the number of common shares PLUS (2) the number of shares the company is obligated to deliver to employees as a result of stock options; (3) to holders of convertible bonds, and (4) preferred stocks that may be converted to stocks.