This is a convoluted situation. Have never sold stock. The 1099-B does not have a cost basis for some of the shares involved.
On August 25, 1997, my wife received 6 shares of General Electric Company stock from her father. He is now long deceased. No record of his cost of that stock.
On May 18, 1998, she gave 1 share of the stock to me and one each to our two minor children as custodian.
She retained 3 shares in her name. Her stock certificate was dated May 18, 1998.
On November 7, 2019, the 1 share of stock of one child no longer a minor was transferred to my wife due to the child's death on October 12, 2014.
Linda sold her shares on August 9, 2019.
Joseph sold his shares on August 9, 2019.
Linda sold the shares inherited from the deceased child on November 19,2019.
The cost basis is the value of the stock at her father’s death if she inherited it or the father’s original cost if he gifted it to her. If the cost basis is unknown and can’t be determined, the IRS will assign a cost basis of zero.
The original 6 shares received from the Father...was that gift or inherited? If inherited, you might be able to use the internet to see the what it sold for on date of her Father's death in 1997. That would be the basis.
If they were a gift from the Father, then the basis would be the Father's basis or cost. If that can't be determined, then you may have to use zero as the basis.
The basis of the stock given to the children, would be whatever basis your wife had in them (either stepped up basis if inherited, or whatever basis that can be established from her father, if can't be established, then zero).
The tricky part of this is the basis in the stock received back from the deceased child. The child's basis would have been whatever your wife's basis was. Based upon dates of the gift to the deceased child, and the child's date of death, the basis when sold by your wife might be the value of the stock on the date of the child's death...or, it might revert back to your wife's original basis in the stock. The following is a direct quote from Pub 551
"
Appreciated property.
The above rule doesn't apply to appreciated property you receive from a decedent if you or your spouse originally gave the property to the decedent within 1 year before the decedent's death. Your basis in this property is the same as the decedent's adjusted basis in the property immediately before his or her death, rather than its FMV. Appreciated property is any property whose FMV on the day it was given to the decedent is more than its adjusted basis."
Here is a link to Pub 551, look at the sections for basis in gifts and inherited property. pages 9 and 10.
https://www.irs.gov/pub/irs-pdf/p551.pdf
To sum up, if your wife received the property as an inheritance, the basis in the 6 shares would be the average of the high and low the stock traded at on the date of her father's death. You might be able to find that through internet search.
If the deceased child died more than one year after receiving the stock from your wife, then it appears the basis in that stock would be the average of the high and low the stock traded at on the date of the child's death.
If the stock was a gift from the father, then you have to establish the father's cost basis. If that can't be established, then you may have to use zero as the basis for the shares sold by Linda and Joseph.
The share sold by Linda from the deceased child is dependent on the date given to the child and when the child died.
this may not matter since you said you never sold stock before and all the advice provided so far makes sense
be aware that GE stock split 3:1 in May of 2000, so all the numbers post that date should really be tripled. So if you Father in law gave 6 shares in 1997, your wife should have had 18 shares if she never sold.
That one share from the deceased's child's estate should have been 3 shares transferred. If there was only 1 transferred , what happened to the other 2 shares?