Calculated as:
When calculating, it is more accurate to use a weighted average number of shares outstanding over the reporting term, because the number of shares outstanding can change over time. However, data sources sometimes simplify the calculation by using the number of shares outstanding at the end of the period.
Diluted EPS expands on basic EPS by including the shares of convertibles or warrants outstanding in the outstanding shares number .
Source:
http://www.investopedia.com