{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"stock-profit"},"result":{"entity_type":"calculator","id":"stock-profit","calculator_id":"stock-profit","canonical_url":"https://tttkmbb.com/finance/stock-profit","name":"Stock Profit Calculator","title":"Stock Profit Calculator – Gross and Net Profit, Return and Break-Even Price after Commissions and Tax","category":"finance","category_name":"Finance","tool_name":"calculate_stock_profit","featured_mcp_tool":false,"description":"Computes the profit or loss on a share trade from buy and sell prices, number of shares, commissions on each side and an optional capital-gains tax rate, with the percentage return on the total cost and the sell price needed to break even.","use_when":"You want to know what you made (or lost) on a stock sale after fees and tax, or the price at which a position becomes profitable.","do_not_use_when":"You want dividend income or reinvestment (use dividend-yield), an annualized return over the holding period (use roi or cagr), or tax lots with different purchase dates.","inputs":[{"name":"buy_price","label":"Buy price per share","type":"number","required":true,"max":10000000,"exclusive_min":0,"description":"Purchase price per share.","example":50},{"name":"sell_price","label":"Sell price per share","type":"number","required":true,"min":0,"max":10000000,"description":"Sale price per share.","example":60},{"name":"shares","label":"Number of shares","type":"number","required":true,"max":1000000000000,"exclusive_min":0,"description":"Shares bought and sold (fractional allowed).","example":100},{"name":"buy_commission","label":"Buy commission","type":"number","required":false,"default":0,"min":0,"max":10000000,"description":"Fees paid on the purchase.","example":10},{"name":"sell_commission","label":"Sell commission","type":"number","required":false,"default":0,"min":0,"max":10000000,"description":"Fees paid on the sale.","example":10},{"name":"capital_gains_tax_percent","label":"Capital gains tax","type":"number","unit":"%","required":false,"default":0,"min":0,"max":100,"description":"Tax rate applied to a positive net gain (0 for none; losses are not taxed).","example":15}],"outputs":[{"name":"total_cost","label":"Total cost","type":"number","decimals":2,"description":"buy_price × shares + buy_commission."},{"name":"total_proceeds","label":"Net proceeds","type":"number","decimals":2,"description":"sell_price × shares − sell_commission."},{"name":"gross_profit","label":"Gross profit","type":"number","decimals":2,"description":"(sell_price − buy_price) × shares, before commissions and tax."},{"name":"net_profit_before_tax","label":"Net profit before tax","type":"number","decimals":2,"description":"total_proceeds − total_cost."},{"name":"capital_gains_tax","label":"Capital gains tax","type":"number","decimals":2,"description":"max(0, net_profit_before_tax) × capital_gains_tax_percent / 100."},{"name":"net_profit","label":"Net profit after tax","type":"number","decimals":2,"description":"net_profit_before_tax − capital_gains_tax."},{"name":"return_percent","label":"Return on cost","type":"number","unit":"%","decimals":2,"description":"net_profit / total_cost × 100."},{"name":"break_even_sell_price","label":"Break-even sell price","type":"number","decimals":4,"description":"(total_cost + sell_commission) / shares: the sale price at which net profit before tax is zero."}],"input_schema":{"type":"object","properties":{"buy_price":{"description":"Purchase price per share.","type":"number","maximum":10000000,"exclusiveMinimum":0,"examples":[50]},"sell_price":{"description":"Sale price per share.","type":"number","minimum":0,"maximum":10000000,"examples":[60]},"shares":{"description":"Shares bought and sold (fractional allowed).","type":"number","maximum":1000000000000,"exclusiveMinimum":0,"examples":[100]},"buy_commission":{"description":"Fees paid on the purchase.","type":"number","minimum":0,"maximum":10000000,"default":0,"examples":[10]},"sell_commission":{"description":"Fees paid on the sale.","type":"number","minimum":0,"maximum":10000000,"default":0,"examples":[10]},"capital_gains_tax_percent":{"description":"Tax rate applied to a positive net gain (0 for none; losses are not taxed). Unit: %.","type":"number","minimum":0,"maximum":100,"default":0,"examples":[15],"x-unit":"%"}},"additionalProperties":false,"required":["buy_price","sell_price","shares"]},"output_schema":{"type":"object","properties":{"total_cost":{"description":"buy_price × shares + buy_commission.","type":"number"},"total_proceeds":{"description":"sell_price × shares − sell_commission.","type":"number"},"gross_profit":{"description":"(sell_price − buy_price) × shares, before commissions and tax.","type":"number"},"net_profit_before_tax":{"description":"total_proceeds − total_cost.","type":"number"},"capital_gains_tax":{"description":"max(0, net_profit_before_tax) × capital_gains_tax_percent / 100.","type":"number"},"net_profit":{"description":"net_profit_before_tax − capital_gains_tax.","type":"number"},"return_percent":{"description":"net_profit / total_cost × 100. Unit: %.","type":"number","x-unit":"%"},"break_even_sell_price":{"description":"(total_cost + sell_commission) / shares: the sale price at which net profit before tax is zero.","type":"number"}}},"formula":"total_cost = buy_price × shares + buy_commission; total_proceeds = sell_price × shares − sell_commission; net_before_tax = total_proceeds − total_cost; tax = max(0, net_before_tax) × capital_gains_tax_percent/100; net_profit = net_before_tax − tax; return = net_profit / total_cost × 100; break_even = (total_cost + sell_commission) / shares","method":"Single lot, no dividends, and a flat tax rate on the gain; actual capital-gains rules (holding period, allowances, loss offsets) vary by country.","sources":[{"name":"IRS – Topic no. 409, Capital gains and losses","url":"https://www.irs.gov/taxtopics/tc409","type":"government","retrieved_at":"2026-09-24"},{"name":"Investopedia – Capital Gains Tax: What It Is, How It Works and Current Rates","url":"https://www.investopedia.com/terms/c/capital_gains_tax.asp","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Rate of return","url":"https://en.wikipedia.org/wiki/Rate_of_return","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"100 shares bought at 50, sold at 60, 10 commission each way, 15 % tax","inputs":{"buy_price":50,"sell_price":60,"shares":100,"buy_commission":10,"sell_commission":10,"capital_gains_tax_percent":15},"expected":{"total_cost":5010,"total_proceeds":5990,"gross_profit":1000,"net_profit_before_tax":980,"capital_gains_tax":147,"net_profit":833,"return_percent":16.63,"break_even_sell_price":50.2},"url":"https://tttkmbb.com/api/v1/calculate/stock-profit?buy_price=50&sell_price=60&shares=100&buy_commission=10&sell_commission=10&capital_gains_tax_percent=15"},{"name":"50 shares bought at 120, sold at 100, no fees","inputs":{"buy_price":120,"sell_price":100,"shares":50},"expected":{"total_cost":6000,"total_proceeds":5000,"gross_profit":-1000,"capital_gains_tax":0,"net_profit":-1000,"return_percent":-16.67,"break_even_sell_price":120},"url":"https://tttkmbb.com/api/v1/calculate/stock-profit?buy_price=120&sell_price=100&shares=50"}],"faq":[{"q":"Why is the break-even price above the buy price?","a":"Commissions on both sides must be recovered: with 10 paid to buy and 10 to sell 100 shares bought at 50, the shares must sell at 50.20 just to get the money back."},{"q":"Which tax rate applies?","a":"In the US, assets held over a year are taxed at long-term rates (0, 15 or 20 % in 2024–2025 depending on income) and shorter holdings at ordinary income rates; other countries have their own rates and allowances."}],"tags":["stock profit","stock calculator","capital gains","break-even price","trading profit","share return"],"related":[{"calculator_id":"roi","reason":"Annualized return over the holding period."},{"calculator_id":"percentage-change","reason":"Percent change between the two prices."},{"calculator_id":"dividend-yield","reason":"Income from the shares while held."}],"links":{"html":"https://tttkmbb.com/finance/stock-profit","markdown":"https://tttkmbb.com/finance/stock-profit.md","json":"https://tttkmbb.com/finance/stock-profit.json","api":"https://tttkmbb.com/api/v1/calculate/stock-profit","schema":"https://tttkmbb.com/api/v1/calculators/stock-profit","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T01:50:28Z","next_actions":[{"tool":"run_calculator","calculator_id":"stock-profit","reason":"Run Stock Profit Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/finance/stock-profit.md"}}