# Calculation of different types of earnings per share

I'm confused about how to calculate diluted earnings per share. As far as I know, for any type of EPS, one must divide the earnings attributable to relevant shareholders by the weighted average number of shares.

I was studying this topic from a source and was bombarded with different types of shares and earnings. Shares - common, diluted, preferred. Earnings - basic earnings, diluted earnings.

It's mentioned that diluted earnings uses:

1. diluted shares or the no. of shares that would hypothetically be outstanding if potentially dilutive claims on common shares (e.g. stock options/convertible bonds) were exercised/converted.
2. an appropriately adjusted profit/loss attributable to common shareholders.

Question: regarding point 1, do we use only the no. of diluted shares or add the number of diluted shares to the no. of common shares? How do we "adjust" the PnL as indicated in point 2?

Secondly, what exactly is "basic earnings" - Is it the PnL attributable ONLY to common shareholders (and NOT preferred shareholders)?

The main source of my confusion is an example in which I saw 4 types of EPS - basic earnings per ordinary share, basic earnings per preferred share, diluted earnings per ordinary share, diluted earnings per preferred share. According to the definition of diluted EPS given in the source, (point 2) we "adjust" PnL attributable to common shareholders.

For diluted earnings per preferred share, shouldn't we "adjust" PnL attributable to preferred shareholders?

Apologies for the flurry of questions but I'm very much confused.

For a complex capital structure, this can get a little murky as you can have warrants, options, convertible debt, etc. It involves a combination of the "assume converted" method along with what is called the "treasury stock" method. Intuitively, the treasury stock method looks something like this: Your average share price was $10 a year and you had 100 warrants outstanding (worth 1 share each) exercisable at$5 per share. That means, if exercised, you will receive 100*$5 =$500. Take the $500 you received / avg share price of$10 = 50 additional common shares. You add these 50 shares to the denominator. - Investopedia for reference