Trading fees and referral payback

ProfitCalc charges one user-entered fee rate on entry notional and the same rate on closing value. Referral payback, when enabled, reduces the sum of those fees by a hypothetical percentage. The interface does not verify an exchange discount or rebate entitlement.

Percentage input and two fee bases

If the entered fee is r percent, f = r / 100. With N = I × L, Q = N / E and C = Q × T, entryFee = N × f and exitFee = C × f. grossFees = entryFee + exitFee. The fee applies to the leveraged values rather than only to initial margin, and the closing fee changes with target price.

Worked fee calculation

For I = $1,000, L = 10, E = $50,000 and T = $55,000, N is $10,000 and C is $11,000. Entering 0.075% gives entryFee = $7.50 and exitFee = $8.25. Gross fees are $15.75. With a long gross PnL of $1,000, disabling payback leaves totalFees at $15.75 and netPnl at $984.25.

How optional payback works

Let p be the enabled payback percentage divided by 100. paybackAmount = grossFees × p and totalFees = grossFees − paybackAmount. At 20%, the example rebate is $3.15, totalFees $12.60 and net PnL $987.40. ROI is 98.74%. This assumes both fee legs qualify in equal proportion and applies the reduction immediately in the scenario; real eligibility and settlement timing are not evaluated.

Boundary cases

When payback is disabled, paybackAmount is exactly zero regardless of any previously entered rate. When enabled, the rate is required and must be finite between 0% and 100%, inclusive. A 0% rate leaves fees unchanged. A 100% rate eliminates modeled fees for otherwise finite calculations. Negative fees are rejected. A zero fee is accepted and makes net PnL equal gross PnL.

Fees can reverse a small gain

With the same $10,000 entry notional but a long target of $50,050, quantity 0.2 creates $10 gross PnL. Exit value is $10,010. Entry and exit fees total $15.0075, leaving net PnL −$5.0075 and ROI −0.50075%. Rounded displays show −$5.01 and −0.50%. A favorable price move therefore does not necessarily yield positive net PnL.

What the single-rate model omits

The calculator does not distinguish maker and taker execution, tiered fee schedules, different entry and exit rates, rebate currencies or per-order minimum charges. Funding payments, slippage and taxes are excluded. Fee input has no arbitrary upper bound, but every derived arithmetic value must stay finite. Use an independently verified fee assumption rather than reading the default as a current exchange quote.

Validation and precision

Entry and target prices, investment and leverage must be finite and positive; fee must be finite and nonnegative. Enabled payback must be between 0% and 100%. All derived arithmetic must remain finite. Both prices start blank; once either is filled, required-field validation applies. Display values are rounded, without intermediate currency rounding.

Model limitations

The calculation assumes a linear USD-denominated contract, fixed quantity and exact entry and exit prices. Funding, slippage, taxes, inverse contracts, maintenance margin and exchange-specific rules are excluded. Payback is hypothetical, not guaranteed. Results may show negative final equity. This is information, not financial advice.

Implementation basis

These statements follow the calculation callback, resetFields and preset handlers in components/Calculator.tsx. Numeric cases are checked by scripts/smoke-calculator.mjs. No external exchange fee, product availability or performance claim is made.