The margin is computed based on the average landed cost (ALC) and selling price of the product.
The ALC is calculated based on the purchase price + any other costs associated with getting the stock to you (excluding taxes). Below is our formula for margin calculation for normal stocked products:
% (unit sale price - ALC) / unit sale price.
Product: Elderflower
Sale price on SO-00064 = 9.96
ALC = 10.9232
Margin = % of (9.96 - 10.9232)/9.96 = -9.67%