How to use a margin calculator