TradeCostKit

Calculator methodology

These educational calculations use explicit inputs and run in your browser. Web tools and widgets import the same calculation library. Public JSON is generated from the formula registry at build time; the examples run through that same library. Formula and example review: 2026-11-29.

Tool catalog JSON · Formula and schema JSON · Experimental AI resource catalog

Scope and limitations

Spread is counted once across a round turn. Minimum advertised spreads are lower bounds; average spreads require a measurement period; actual spreads depend on executions. For account comparison, swap, commission, other fees and eligible rebates are entered per completed lot for the same holding period. Historical totals model the entered rates across the entered volume and are not audited historical savings.

A gold contract reference is scoped to its source. Missing fields remain null, and 100 ounces is never a universal rule. Review official-source gold specifications.

Formula registry and worked examples

pip-value

lots × contract × pip × conversion

lots
lots; non-negative
contract
base units or ounces per lot; greater than zero
pip
quote price increment; greater than zero
conversion
result currency per quote currency; greater than zero

Illustrative input: {"lots":1,"contract":100,"pip":0.01,"conversion":1}

Computed output: {"value":1}

rebate

lots × rate

lots
eligible completed lots; non-negative
rate
result currency; non-negative

Illustrative input: {"lots":12,"rate":2.5}

Computed output: {"value":30}

percentage

amount × percentage ÷ 100

amount
result currency; non-negative
percentage
percent; non-negative; maximum 100

Illustrative input: {"amount":100,"percentage":80}

Computed output: {"value":80}

commission

lots × rate × sides

lots
lots; non-negative
rate
result currency per lot per charged side; non-negative
sides
charged sides; non-negative; allowed: 1, 2

Illustrative input: {"lots":1,"rate":3.5,"sides":2}

Computed output: {"value":7}

spread

spread × pipValue

spread
pips; non-negative
pipValue
result currency per pip for selected position; non-negative

Illustrative input: {"spread":1.2,"pipValue":10}

Computed output: {"value":12}

total-cost

spread + commission − signed swap

spread
result currency; non-negative
commission
result currency; non-negative
swap
result currency; positive income, negative charge; signed finite number

Illustrative input: {"spread":12,"commission":7,"swap":-2}

Computed output: {"value":21}

account-cost

gross = spread × pipValue + commission − swap + otherFees; net = gross − rebate; historical = per-lot cost × volume

spread
pips; non-negative
pipValue
result currency per pip per lot; non-negative
commission
round-turn result currency per lot; non-negative
swap
result currency; positive income, negative charge; signed finite number
otherFees
result currency per lot; non-negative
rebate
eligible result currency per lot; non-negative
volume
completed historical lots; non-negative

Illustrative input: {"spread":1.2,"pipValue":10,"commission":7,"swap":-2,"otherFees":1,"rebate":3,"volume":10}

Computed output: {"spread":12,"gross":22,"net":19,"historicalGross":220,"historicalNet":190}

units-to-lots

lots = value ÷ contract; units = value

value
base units; non-negative
contract
base units per lot; greater than zero

Illustrative input: {"value":10000,"contract":100000}

Computed output: {"lots":0.1,"units":10000}

lots-to-units

units = value × contract; lots = value

value
lots; non-negative
contract
base units per lot; greater than zero

Illustrative input: {"value":0.01,"contract":100000}

Computed output: {"lots":0.01,"units":1000}

position-size

theoretical = risk ÷ (stop × pipValue(1 lot) + commissionPerLot); lots = floor(theoretical ÷ step) × step, zero below minimum; never round above risk

risk
result currency; non-negative
stop
pips; greater than zero
contract
base units per lot; greater than zero
pip
quote price increment; greater than zero
conversion
result currency per quote currency; greater than zero
commissionPerLot
round-turn result currency per lot; non-negative
step
lots; greater than zero
minimum
lots; non-negative

Illustrative input: {"risk":100,"stop":50,"contract":100000,"pip":0.0001,"conversion":1,"commissionPerLot":7,"step":0.01,"minimum":0.01}

Computed output: {"theoretical":0.19723865877712032,"lots":0.19,"units":19000,"pipValue":1.9000000000000001,"commission":1.33,"risk":96.33}

recorded-cost

−(commission + swap + fee)

commission
result currency; positive income, negative charge; signed finite number
swap
result currency; positive income, negative charge; signed finite number
fee
result currency; positive income, negative charge; signed finite number

Illustrative input: {"commission":-7,"swap":2,"fee":0}

Computed output: {"value":5}

notional

units × price × conversion

units
base units; non-negative
price
quote currency per base unit; greater than zero
conversion
result currency per quote currency; greater than zero

Illustrative input: {"units":100000,"price":1.1,"conversion":1}

Computed output: {"value":110000.00000000001}

margin

notional ÷ leverage

notional
result currency; non-negative
leverage
leverage ratio; greater than zero

Illustrative input: {"notional":110000,"leverage":100}

Computed output: {"value":1100}

Statement analyzer and market hours

The analyzer sums recorded signed commission, swap and fees separately by currency. Net recorded cost is the negative sum of these cash flows. It cannot infer historical spreads or reconstruct MT5 deals from MT5 HTML. Supported inputs are normalized closed-trade CSV and the documented English MT4 HTML layout. Read analyzer limits and try a synthetic sample.

Market hours use IANA time zones and your device clock. They are indicative sessions rather than an exchange holiday schedule.

Discovery and privacy

The AI catalog is a low-cost resource-discovery experiment, with no promised AI citation or ranking benefit. Static JSON contains metadata and synthetic examples only. Calculator inputs and trading reports are not included, and no analytics events transmit financial inputs. No registration is needed.

Widget catalog · Privacy policy · All calculators