How to enter the cost of stock

David Carlson david.carlson.417 at
Sat May 16 20:03:02 EDT 2015

On 5/16/2015 5:40 PM, Heide Wang wrote:
> Can you tell me how to enter a selling transaction on a stock has multiple cost? if my stock has one purchase price and three different cost dividend reinvested price, when I sell the stock, how should I record the transaction??
> Heide
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

There are a number of ways to acquire the details, but the one I prefer
is to build a spreadsheet to list each purchase with brokerage account
name, number of shares, purchase date, price, commission, net cost and
space to put a link to a future sale.

Then, when I sell, I can pick the ones I am selling, probably using FIFO
method, add up the purchase prices, dates, etc, and calculate the
capital gain, LT or ST.  This provides the numbers to put into the sale
transaction.  Depending on whether you track commissions separately you
must enter a gross or net gain or loss to zero out the value of that
security position as you close it.  The sum of the sale proceeds must
equal the amount(s) originally paid plus the gain or loss.  GnuCash does
not calculate that for you, you need to do it yourself.

Read the help for details on what a sale transaction should look like in
GnuCash.  It is sometimes tricky to get the 0 shares line entered for
the security account.  Type 0, tab, 0, tab through the number of shares
and price boxes to the value box to enter the gain or loss.

David C

More information about the gnucash-user mailing list