The cost basis of any investment is the original value of an asset adjusted for stock splits, dividends and capital distributions. It is used to calculate the capital gain or loss on an investment for tax purposes.
At the most basic level, the cost basis of an investment is just the total amount invested into the company plus any commissions involved in the purchase. This can either be described in terms of the dollar amount of the investment, or the effective per share price that you paid for the investment.
The calculation of cost basis can be complicated, however, due to the many changes that will occur in the financial markets such as splits and takeovers. For the sake of simplicity, we will not include commissions in the following examples, but this can be done simply by adding the commission amount to the investment amount ($10,000 + $100 in commissions = $10,100 cost basis).
Imagine that you invested $10,000 in ABC Inc., which gave you 1,000 shares in the company. The cost basis of the investment is $10,000, but it is more often expressed in terms of a per share basis, so for this investment it would be $10 ($10,000/1,000). After a year has passed, the value of the investment has risen to $15 per share, and you decide to sell. In this case, you will need to know your cost basis to calculate the tax amount for which you are liable. Your investment has risen to $15,000 from $10,000, so you face capital gains tax on the $5,000 ($15  $10 x 1,000 shares). (For further reading, see A LongTerm Mindset Meets Dreaded Capital Gains Tax and Tax Tips For The Individual Investor.)
If the company splits its shares, this will affect your cost basis per share. Remember, however, that while a split changes an investor's number of shares outstanding, it is a cosmetic change that affects neither the actual value of the original investment, nor the current investment. Continuing with the above example, imagine that the company issued a 2:1 stock split where one old share gets you two new shares. You can calculate you cost basis per share in two ways: First, you can take the original investment amount ($10,000) and divide it by the new amount of shares you hold (2,000 shares) to arrive at the new per share cost basis ($5 $10,000/2,000). The other way is to take your previous cost basis per share ($10) and divide it by the split factor (2:1). So in this case, you would divide $10 by 2 to get to $5. (For more insight, check out Understanding Stock Splits.)
However, if the company's share price has fallen to $5 and you want to invest another $10,000 (2,000 shares) at this discounted price, this will change the total cost basis of your investment in that company. There are several issues that come up when numerous investments have been made. The Internal Revenue Service (IRS) says that if you can identify the shares that have been sold, then their cost basis can be used. For example, if you sell the original 1,000 shares, your cost basis is $10. This is not always easy to do, so if you can't make this identification, the IRS says you need to use a first in, first out (FIFO) method. Therefore, if you were to sell 1,500 shares, the first 1,000 shares would be based on the original or oldest cost basis of $10, followed by 500 shares at a cost basis of $5. This would leave you with 1,500 shares at a cost basis of $5 to be sold at another time.
In the event that the shares were given to you as a gift, your cost basis is the cost basis of the original holder, or the person who gave you the gift. If the shares are trading at a lower price than when the shares were gifted, the lower rate is the cost basis. If the shares were given to you as inheritance, the cost basis of the shares for the inheritor is the current market price of the shares on the date of the original owner's death. There are so many different situations that will affect your cost basis and because of its importance with regards to taxes, if you are in a situation in which your true cost basis is unclear, please consult a financial advisor, accountant or tax lawyer.
For more on how to use cost basis, check out Using Tax Lots: A Way To Minimize Taxes.

How do you calculate the cost basis for a mutual fund over an extended time period?
Investors must pay taxes on any investment gains they realize. Subsequently, any capital gain realized by an investor over ... Read Answer >> 
What is an adjusted cost basis and how is it calculated?
Learn what adjusted cost basis is, how it is calculated, and why this metric is important for investors, business owners ... Read Answer >> 
If I owned stock that split last year, how does this affect my taxes?
Find out why standard stock splits do not change the value of an investor's portfolio and are unlikely to directly affect ... Read Answer >>

Managing Wealth
Know Your Stock Cost Basis
Understanding equity cost basis is critical for tracking the gains or losses of an investment. 
Managing Wealth
What Determines Your Cost Basis?
In any transaction between a buyer and seller, the initial price paid in an exchange for a product or service will qualify as the cost basis. When it comes to securities and related financial ... 
Managing Wealth
Know Your Stock Cost Basis
A stock’s cost basis is its purchase price plus all reinvested dividends and commissions. 
Managing Wealth
Cost Basis Basics
The term "cost basis" refers to the original value of a security you own. When you sell a stock, bond or mutual fund, you use the cost basis to determine your profit or loss, which in turn affects ... 
Investing
Don't Lose Your Shirt On Mutual Fund Sales
Mutual funds aren't guaranteed profitmakers, but with the right calculations and timing, you can avoid major losses. 
Investing
Stock Splits: A Closer Look At Its Effects
Most trades, including short sales and options, aren't materially affected by a stock split. Still, it's important for shareholders to understand how these events impact various aspects of investing. ... 
Trading
Figuring Out a Stock Investment’s Cost Basis
An investment’s cost basis is basically the total amount invested, plus any commissions. 
Investing
Don't Let Stock Prices Fool You
Find out why a stock with a sixfigure share price can still be a good value. 
Financial Advisor
The Basics of Income Tax on Mutual Funds
Learn about the basics of income tax on mutual funds, including what types of income may be subject to the capital gains tax rate. 
Investing
Understanding Stock Splits
We explain what they are, the thinking behind them as well as their results.

Cost Basis
1. The original value of an asset for tax purposes (usually the ... 
Average Cost Basis Method
A system of calculating the cost basis on mutual fund positions ... 
Yield On Cost  YOC
The annual dividend rate of a security divided by the average ... 
IRS Publication 551  Basis Of Assets
A document published by the Internal Revenue Service (IRS) that ... 
Stock Split
A corporate action in which a company divides its existing shares ... 
Purchase Price
The price that an investor pays for a security. This price is ...