Once you understand basis, you're in a position to compute the gain or loss from your specific sale of mutual fund shares.
The IRS lets you choose from one of three methods:
Average basis
Specific share identification
First-in first-out (FIFO)