The definitions
Markup is calculated on the cost. Cost 100, markup 50% → price 150. Your profit is 50, which is 33% of the sale price.
Margin is calculated on the sale price. Cost 100, margin 50% → price 200, because half of what the customer pays should be your profit.
The formulas
Markup: price = cost × (1 + markup %). Margin: price = cost / (1 − margin %).
The same percentage therefore gives very different prices. Rule of thumb: margin is always "bigger" than the corresponding markup — 50% margin equals 100% markup, 30% margin equals roughly 43% markup.
In the plugin
You choose margin or markup per rule. The preview always shows the real margin the final price yields (after rounding and VAT), so you immediately see whether rounding up gave you 41.2% instead of 40. The margin is measured against the real cost, not the calculation cost — buffers and landed costs are costs, not profit.