For a given timeframe and ASIN(s) selected:
Total sales (net of discounts, including shipped and pending) - COGS - all AMZ fees / avg selling price.
For this formula, average selling price is total sales (net of discounts, including shipped and pending orders) / total units shipped.