Stock Profit Calculator

Stock Profit is evaluated from Buy Price per Share, Sell Price per Share and Number of Shares. The calculation reports Total Invested, Total Proceeds and Profit / Loss.

Results

Thanks — we’ve logged this for review.

About the Stock Profit Calculator

Stock Profit is treated here as a quantitative relation between Buy Price per Share, Sell Price per Share, Number of Shares and Buy Commission and Total Invested, Total Proceeds, Profit / Loss and Return%.

The calculator uses a multi formula configuration. Each reported value is read as a direct evaluation of the stored rules with the declared field formats and units.

Formula basis:
Profit = (sell x shares - sell commission) - (buy x shares + buy commission). Return% = profit / cost basis x 100. Annualized return normalizes to a yearly rate.

Interpret the outputs in the order shown by the result fields. Optional inputs affect only the outputs that depend on those variables.

Formula & How It Works

The calculation applies the following relations exactly as recorded in the metadata:

Profit = (sell x shares - sell commission) - (buy x shares + buy commission). Return% = profit / cost basis x 100. Annualized return normalizes to a yearly rate.

Each output field is produced by substituting the supplied inputs into the relevant relation and then applying the declared rounding or text format.

Worked Examples

Example 1: Apple stock: buy 50 shares at $150, sell at $185

Inputs

buy_price: 150 sell_price: 185 shares: 50 buy_commission: 0 sell_commission: 0 hold_days: 365
Total Invested: $7,500. Total Proceeds: $9,250. Profit / Loss: $1,750. Return%: 23.33%. Annualized Return: 23.33%

With Buy Price per Share = 150, Sell Price per Share = 185, Number of Shares = 50 and Buy Commission = 0 as the stated inputs, the result is Total Invested = $7,500, Total Proceeds = $9,250 and Profit / Loss = $1,750. Each value corresponds to the declared output fields.

Example 2: Tesla stock loss: buy 20 shares at $350, sell at $200

Inputs

buy_price: 350 sell_price: 200 shares: 20 buy_commission: 0 sell_commission: 0 hold_days: 180
Total Invested: $7,000. Total Proceeds: $4,000. Profit / Loss: $3,000. Return%: -42.86%. Annualized Return: -67.85%

With Buy Price per Share = 350, Sell Price per Share = 200, Number of Shares = 20 and Buy Commission = 0 as the stated inputs, the result is Total Invested = $7,000, Total Proceeds = $4,000 and Profit / Loss = $3,000. Each value corresponds to the declared output fields.

Example 3: Index fund: buy 100 shares at $400 (VOO ETF), sell at $450

Inputs

buy_price: 400 sell_price: 450 shares: 100 buy_commission: 0 sell_commission: 0 hold_days: 730
Total Invested: $40,000. Total Proceeds: $45,000. Profit / Loss: $5,000. Return%: 12.5%. Annualized Return: 6.07%

With Buy Price per Share = 400, Sell Price per Share = 450, Number of Shares = 100 and Buy Commission = 0 as the stated inputs, the result is Total Invested = $40,000, Total Proceeds = $45,000 and Profit / Loss = $5,000. Each value corresponds to the declared output fields.

Example 4: Day trade: buy 200 shares at $50.10, sell same day at $50.45, $5 commission each way

Inputs

buy_price: 50.1 sell_price: 50.45 shares: 200 buy_commission: 5 sell_commission: 5 hold_days: 1
Total Invested: $10,025. Total Proceeds: $10,085. Profit / Loss: $60. Return%: 0.6%. Annualized Return: 782.89%

With Buy Price per Share = 50.1, Sell Price per Share = 50.45, Number of Shares = 200 and Buy Commission = 5 as the stated inputs, the result is Total Invested = $10,025, Total Proceeds = $10,085 and Profit / Loss = $60. Each value corresponds to the declared output fields.

Common Use Cases

  • Calculate profit from selling stocks
  • Find percentage return on a stock trade
  • Compare returns across different stock investments