Hi, ps56k.
There must be details which you haven't told us. :>{
Several factors can cause an asset's Cost Basis (for income tax purposes) to be different from its actual purchase price. Most of these factors don't apply to a normal purchase for cash on a stock exchange, though. They may involve stock splits, tax-free acquisitions of one corporation by another, spin-offs...not to mention the calculation of basis for assets acquired by gift or inheritance. Then, of course, there are the "wash sale" rules for stock purchased within a month of the sale at a loss of "substantially identical" securities. You haven't told us if any of these - or other special conditions - apply to your shares.
You did mention sales of "some" shares. Are you SURE that the basis of the sold shares, and of the remaining shares, was correctly computed and allocated between them?
The correct calculation might be very simple. Or it might be complicated, based on facts which you haven't told us, and which you may not want to post in a public newsgroup. What does your own CPA say about the bases of these shares?
RC