How to Calculate Custom Macros