How does selling some shares affect cost basis + average price
How does selling some shares affect cost basis + average price
Loading saved threads...
Daniel Cooke · External communityPost link
External question — Personal Finance Stack Exchange
Author: Daniel Cooke
Original post: https://money.stackexchange.com/questions/152139
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I am building a stock portfolio tracking application, and I am having some difficulties wrapping my head around something very basic (maybe I'm just tired)
How does selling a stock affect the cost basis / average price of the remaining stock?
Example
I buy 10 shares at an average price of $1
averagePrice: 1,
costBasis: 10,
quantity: 10,
I then
sell
5 of these shares at market price of $5
averagePrice: ???
costBasis: ???
quantity: 5
The only value that I know for certain is the quantity, I have heard different brokers use different methods for calculating this cost basis.
Can someone help me fill in the values? I apologise if this is really dumb.
Quote
Report
D Stanley · External communityPost link
External answer — Personal Finance Stack Exchange
Author: D Stanley
Original post: https://money.stackexchange.com/a/152140
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
If you use the average cost basis method, then your cost basis for the 5 shares that were sold and the remaining 5 shares is still $1. If you buy more shares, those are combined with the 5 shares with an average cost of $1 and a new average is computed to be used for future sales.
In absolute terms, if your cost basis is $1 per share and you have 10 shares, your cost basis is $10. If you sell 5 shares and have 5 shares left, then your overall cost basis is $5.
If you want to use another method like FIFO, LIFO, or specific lots, then you need to know the cost basis of individual lots to calculate a new cost basis.
Quote
Report
LoztInSpace · External communityPost link
External answer — Personal Finance Stack Exchange
Author: LoztInSpace
Original post: https://money.stackexchange.com/a/152165
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
How does selling a stock affect the cost basis / average price of the
remaining stock?
It doesn't. The value of the shares at the time of acquisition* determines the cost basis for each share in that transaction. When you sell, your capital gain (or loss) is the difference between CB & the sell price.
Notionally, each share has its own CB but realistically each one acquired in a given transaction will be the same and stay the same for as long as you own it **. If you sell shares acquired over multiple transactions you might have multiple CBs to wrangle at tax time.
*The flowery and vague language is due to the fact that buying is not the only way to acquire shares. Reinvestment plans, rights issues, takeovers & other corporate actions are also ways to gain shares that's not always the market price. Additionally, the cost to buy incorporates any brokerage fees, not just the price itself.
**Splits & consolidations may change the per-share CB, but not the CB of the transaction.
[Australia]
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External question — Personal Finance Stack Exchange Author: Daniel Cooke Source score (net votes, not local likes): 3 Original post: https://money.stackexchange.com/questions/152139 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. I am building a stock portfolio tracking application, and I am having some difficulties wrapping my head around something very basic (maybe I'm just tired) How does selling a stock affect the cost basis / average price of the remaining stock? Example I buy 10 shares at an average price of $1 averagePrice: 1, costBasis: 10, quantity: 10, I then sell 5 of these shares at market price of $5 averagePrice: ??? costBasis: ??? quantity: 5 The only value that I know for certain is the quantity, I have heard different brokers use different methods for calculating this cost basis. Can someone help me fill in the values? I apologise if this is really dumb.
Checking account access…