Test: how to calculate margin?