A practical tool for investors to quickly calculate realized gains from partial sells, the new average cost after adding positions, and the required buy-in to reach a target cost basis. Whether you are trading U.S., Hong Kong, or Taiwan stocks, this calculator helps you understand your cost structure and potential returns, supporting more informed investment decisions.
The average cost, or cost basis, is the weighted average price you paid for your shares.
It reflects your true entry level after factoring in multiple buys at different prices.
Selling part of your position allows you to lock in some profits or reduce risk.
Calculating partial sell gains helps distinguish realized profit from the remaining unrealized position.
If you aim to lower your average cost to a desired level, this feature shows how many shares you need to buy and how much capital is required. It helps plan averaging-down strategies more effectively.
The calculator works for any stock market — U.S., Hong Kong, Taiwan, or others — as long as you input share quantities and prices.
All calculations run in your browser.
Your inputs are not uploaded or stored and nothing is written to our server database. Closing or refreshing the page clears your entries (aside from your browser’s own autofill). For educational use only–not investment advice.