For example, a company with 100,000,000 shares outstanding and a stock price of $50 per share has a market capitalization of $5,000,000,000. If the company initiated a 2-for-1 stock split, every investor in the company would be given 2 shares at $25 for every 1 share at $50. Then the company would have 200,000,000 shares outstanding with a price of $25 per share, so the market capitalization remains $5,000,000,000. 2-for-1 splits are the most common, but others include 3-1, 3-2, 4-3, 5-2, and 5-4.
The reverse stock split, or consolidation, is not as common. It can be used by a company to drive up the raw price of the shares, while leaving the valuation the same. This is mostly used when a company's share price drops into the pennies, which makes it disappear from many financial companies' radar. Reverse splits are generally frowned upon by investors as last-ditch efforts by company management to avoid delistment from stock exchanges and as a means of making a struggling company appear more valuable without actually changing anything.