Perp PnL equals price difference times size, minus costs. Work through long and short examples plus funding and fee adjustments.