Model the PnL of a cash purchase and sale
Enter your own quantity, prices and transaction fees, and keep the gross price difference separate from the net result. The calculator starts with prefilled, editable model assumptions and a result. These are not an actual quote, company accounts or recommended values. Edit the inputs and recalculate; Restore example returns to the initial assumptions.
1. Choose the explicit cash-long model
Choose the named unleveraged cash-long variant, a common currency and a positive quantity. Enter a positive purchase price and your hypothetical sale price. Quantity is the same for entry and exit, so this is one complete hypothetical purchase and sale, rather than a sale of part of a portfolio lot. A sale price of zero is supported as a total price-loss assumption. The calculator does not know the instrument, fetch a quote, verify an execution or read a portfolio position. Supply your own assumptions rather than treating a book value or the price of another instrument as a market quote.
All prices, fee amounts and outputs use the one selected currency. Changing its label does not convert the entered values. The quantity represents units of the asset and is independent of the cash amount. Enter decimals with a point, without exponent notation or thousands separators. The bounded input format accepts up to 24 integer and 18 fractional digits. The model describes cash price differences; short positions, futures contract multipliers, funding, margin and liquidation require different product-specific rules.
2. Read gross proceeds and the price difference
Gross purchase value is quantity multiplied by purchase price. Gross sale value is the same quantity multiplied by sale price. Their difference is gross PnL before transaction fees. For explicitly hypothetical quantity 2, purchase price 100 and sale price 120, these amounts are 200,240 and 40 in the chosen currency. A lower sale price gives a negative gross difference. This is a scenario result, not a statement that a real trade has closed, a broker confirmation or a recorded portfolio gain.
The result and its breakdown come from the same accepted input bundle. Each edit hides the old result until you explicitly calculate again. Exact cash products and differences preserve tiny supported values rather than turning them into zero through display rounding. A long displayed value marked ≈ is presentation rounding; read the original financial strings and working outputs in the detail when precision matters. An unsupported input or numerical result is refused instead of silently replaced with an estimated amount.
3. Keep unknown fees separate from known zero
Purchase and sale fees are separate cash amounts for the entire respective transaction, in the selected currency. They are not a percentage, a fee per share or a provider tariff. The prefilled amounts are editable model assumptions; mark a value unknown when you cannot establish it for your scenario. To model a known zero fee, explicitly enable that fee and enter 0. A blank enabled fee is incomplete and cannot be treated as zero. An unknown fee still permits the gross result, but the corresponding after-fee amount remains unavailable. The model does not invent a broker commission from the selected currency or trade size.
When the purchase fee is known, acquisition cost is gross purchase value plus that fee. When the sale fee is known, net proceeds are gross sale value minus that fee. Net PnL and total fees become available only when both fee amounts are known. In the hypothetical example above, entry fee 2 and exit fee 3 give acquisition cost 202, net proceeds 237, total fees 5 and net PnL 35. Negative net proceeds can be a valid outcome when your stated sale fee exceeds proceeds; the model does not clamp this loss to zero.
4. Check the stated percentage denominator
The named net-PnL-to-acquisition-cost percentage divides net PnL by gross purchase value plus the purchase fee, then multiplies by 100. The exit fee is already deducted in the numerator. Both fees must be known before this ratio is available. Read its denominator literally: it is the model’s acquisition-cost comparison, not a claim to a universal ROI convention, margin return or annualized performance. It has no holding-period input and does not include dividends, coupons, tax, financing or later cash flows.
A loss larger than 100 percent can arise from explicitly supplied fees, even though the unleveraged sale price itself cannot be negative. The working division uses declared finite 384-significant-digit HALF_EVEN precision for recurring decimals. Cash products and differences use exact arithmetic. This distinction keeps the numerator separate from rounding of the percentage. Do not compare the resulting percentage directly with the annual return of a fund or a portfolio XIRR calculated over dated external cash flows.
This is a guide to Datisto. Private features require sign-in and access to your own data. Personal models use your assumptions; availability and permitted use of source data are checked with the particular result. This is not investment advice.