Unless funds are invested within a legal tax shelter such as an individual retirement account the U.S. Internal Revenue Service, or IRS, will be looking for taxes due when a given investment is sold and profit is earned. This unfortunate fact is due to the IRS' legal perspective that new money coming into a person's ownership is generally considered new income unless it falls into a few specific exemptions. New income is taxable, and it's the IRS' job to collect those taxes from people as necessary.
However, the exact tax rate that applies to investments is different than normal income, depending on the type of investment. Normal income earned from working a job or being paid for a service falls in general tax tables. Those tables have rates that increase in percentage due as the person earns more and more money within a given year.
An investment profit is generally considered a capital gain. Under federal tax law, the capital gains tax rate is far less than that applied to earned income from working. Further, the capital gains tax rate is only applied to that amount of money considered new, or profit.
For example, if an investment was originally bought for $100 and sold two years later for $300, the capital gains tax rate would only apply to the value growth difference of $200. It's because of this tax law nuance that a millionaire who makes most of his income from investments instead of working can end up paying a lower tax rate than a person earning $50,000 in a year from regular employment. The capital gains tax rate takes less than the general income tax rate the IRS uses. That said, the millionaire is still probably paying far more, dollar for dollar, than the worker. However, the rate difference creates an appearance of disparity in the tax system application.
For those that do buy and sell investments regularly, it's also important to note that not every investment falls into the general capital gains tax rate. Selling precious metals, for example, triggers a different tax rate than selling public market stocks. A real estate transaction selling a primary home may enjoy an exemption on the money earned if the funds are used to buy a new home within the same tax year, while selling shares of a mutual fund after a good return enjoy no such benefit.
How an applicable tax rate will play out on a given investment depends a lot on what type of investment is involved, what exemptions may apply if allowed in the tax code, what expenses or cost of investment was involved as well, and what the net profit ultimately ended up being. In some cases an investment turns out to be a loss. In that case, no taxes apply at all.
Investment losses also influence applicable tax rates as well. In some cases losses realized can offset net profits, reducing any taxes owed in the end. This is common with the sale of public market stocks and mutual funds.