A stock split will affect your number of shares and your basis in each share. To determine your new basis per share, you would divide your total adjusted basis of the old stock by the number of shares you hold after the split. If all of the shares are sold together, this will not affect your gain or loss because you will enter the total purchase price and the total sales price for purposes of calculating your gain (loss).
Per IRS Publication 17 Your Federal Income Tax, Page 100:
Stocks and Bonds
The basis of stocks or bonds you buy is generally the purchase price plus any costs of purchase, such as commissions and recording or transfer fees. If you get stocks or bonds other than by purchase, your basis is usually determined by the FMV or the previous owner's adjusted basis, as discussed earlier.
You must adjust the basis of stocks for certain events that occur after purchase. For example, if you receive additional stock from nontaxable stock dividends or stock splits, reduce your basis for each share of stock by dividing the adjusted basis of the old stock by the number of shares of old and new stock. This rule applies only when the additional stock received is identical to the stock held. Also reduce your basis when you receive nontaxable distributions. The nontaxable distributions are a return of capital.