Price/earnings ratio is defined as:
P/E = Share Price / Earnings per Share
If we multiply both the numerator and the denominator with the number of shares, we get:
P/E = Market Capitalization / Net Income
However, wikipedia says:
Some people mistakenly use the formula market capitalization / net income to calculate the P/E ratio. This formula often gives the same answer as market price / earnings per share, but if new capital has been issued it gives the wrong answer, as market capitalization = market price × current number of shares whereas earnings per share= net income / weighted average number of shares.
Can someone please give a simple example of how this second formula can be incorrect, how the formula can be corrected, and under what circumstances the formula would be correct.