Three measures, three denominators
Gross margin divides gross profit by the selling price. Markup divides the gap between price and landed cost by the landed cost. After-shipping contribution subtracts shipping and payment as well.
A 58% gross margin and a 140% markup can describe the same $60 order. They are not interchangeable, and neither is net profit.
Landed cost is more than the product
Landed cost includes the product, inbound freight and duty. If you use the factory price only, gross margin looks better than it is.
Keep the landed cost per unit current. Freight and duty move more often than product cost.
Worked example
Price $60, landed cost $25, no discount, shipping subsidy $5, payment 2.9% + $0.30.
Gross profit is $35, gross margin 58.33% and markup 140%. Payment is $2.04, so after-shipping contribution is $27.96 and contribution margin is 46.60%.
Discounts move all three
A $10 discount lowers gross profit to $25 and gross margin to 41.67%, but markup stays 140% because it does not include the discount. Payment falls to $1.75 and contribution to $18.25.
This is why a discount discussion should use contribution, not markup. Markup can look unchanged while the order becomes much less profitable.
When price is below cost
If landed cost plus discount exceeds the price, gross profit is negative. The calculator shows a warning rather than hiding it behind a percentage.
If landed cost is zero, markup is undefined because the denominator is zero; gross margin can still be calculated. That is a boundary, not a 100% markup.
Where gross margin stops
It excludes ad spend, fixed overhead, taxes and refunds. A positive gross margin does not guarantee a profitable order after acquisition cost.
Use the contribution line for shipping and payment, then a net profit or LTV model for ads, overhead and repeat purchases.