The default method for matching closing orders to opening orders is First In, First Out or FIFO. Under FIFO, if you sell shares of a security that you've bought on multiple occasions, the sale would match to and sell the oldest shares first.
Account holders can change their default method using the Classic Tax Optimizer tool.
IBKR also offers tax-advantaged account types for clients who are U.S. citizen, such as IRA accounts. Please click here to learn more about these account offerings.
Additional Information