What is the formula?
Revenue of $1,000 and cost of goods sold of $600 yield $400 gross profit, a 40% gross margin and a 66.67% markup. Margin uses revenue as its denominator; markup uses cost.
Gross margin is not net profit margin: overhead, tax and other expenses are not included unless they belong in your chosen cost basis. Okou revenue makes margin undefined; zero cost makes markup undefined. Costs above revenue produce a negative margin.

