Payroll Calculator Formula

Understand the math behind the payroll calculator. Each variable explained with a worked example.

Formulas Used

Annual Gross Pay

annual_pay = hourly_rate * hours_per_week * 52

Monthly Gross Pay

monthly_pay = hourly_rate * hours_per_week * 52 / 12

Biweekly Gross Pay

biweekly_pay = hourly_rate * hours_per_week * 2

Weekly Gross Pay

weekly_pay = hourly_rate * hours_per_week

Variables

VariableDescriptionDefault
hourly_rateHourly Rate(USD)30
hours_per_weekHours Per Week(hours)40

How It Works

How to Calculate Payroll

Formulas

  • Annual = Hourly Rate x Hours Per Week x 52
  • Monthly = Annual / 12
  • Biweekly = Hourly Rate x Hours Per Week x 2
  • Weekly = Hourly Rate x Hours Per Week
  • These are gross pay amounts before taxes and deductions. Actual take-home pay will be lower.

    Worked Example

    An employee earning $30/hour working 40 hours per week.

    hourly_rate = 30hours_per_week = 40
    1. 01Weekly pay = $30 x 40 = $1,200
    2. 02Biweekly pay = $1,200 x 2 = $2,400
    3. 03Annual pay = $30 x 40 x 52 = $62,400
    4. 04Monthly pay = $62,400 / 12 = $5,200

    Ready to run the numbers?

    Open Payroll Calculator