calculate_crypto_profit_loss
Calculate cryptocurrency trading profit or loss including transaction fees. Input buy price, sell price, quantity, and optional fee percentages to get net P&L, ROI percentage, and break-even price.
Instructions
Compute crypto trading profit/loss including fees. Use for crypto investors tracking realized P&L. Inputs: buy price, sell price, quantity, buy fee, sell fee. Returns net P&L, ROI %, break-even price. See list_bundles for related 'crypto' calculators.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buy_price | Yes | Purchase price per unit in fiat currency | |
| sell_price | Yes | Sale price per unit in fiat currency | |
| quantity | Yes | Quantity of cryptocurrency traded | |
| buy_fee_pct | No | Buy transaction fee percentage (default 0.1%) | |
| sell_fee_pct | No | Sell transaction fee percentage (default 0.1%) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | Computed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools). | |
| formula | No | Human-readable formula or method used (e.g. "I=P·r·t", "Magnus formula"). | |
| source | No | Authoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21"). | |
| reference_url | No | Link to a calcul2 page documenting the calculation in detail. |