compensation calculation