The formula for payroll varies depending on the specific components of an employee’s compensation package. However, the general formula for calculating gross pay, which is the amount of compensation an employee earns before any deductions are taken out, is defined above. You can check your payroll by using the calculator.