University of Cambridge Staff On-costs Calculator

The ucamstaffoncosts module calculates total on-costs associated with employing staff members in the University of Cambridge. The total on-costs value calculated by this module reflects the expenditure which will result from employing a staff member on a grant.

The aim is to replicate the information available on the University HR’s website using only the publicly available rates.

Installation

Installation is best done via pip:

$ pip install git+https://github.com/uisautomation/pidash-ucamstaffoncosts

Example

The functionality of the module is exposed through a single function, on_cost(), which takes a tax year, pension scheme and gross salary and returns an OnCost object representing the on-costs for that employee:

>>> import ucamstaffoncosts
>>> ucamstaffoncosts.on_cost(gross_salary=25000,
...                          scheme=ucamstaffoncosts.Scheme.USS, year=2018)
OnCost(salary=25000, exchange=0, employer_pension=4500,
       employer_nic=2287, apprenticeship_levy=125, total=31912)

The total attribute from the return value can be used to forecast total expenditure for an employee in a given tax year.

If year is omitted, then the latest tax year which has any calculators implemented is used. This behaviour can also be signalled by using the special value LATEST:

>>> import ucamstaffoncosts
>>> ucamstaffoncosts.on_cost(gross_salary=25000,
...                          scheme=ucamstaffoncosts.Scheme.USS,
...                          year=ucamstaffoncosts.LATEST)
OnCost(salary=25000, exchange=0, employer_pension=4500,
       employer_nic=2287, apprenticeship_levy=125, total=31912)
>>> ucamstaffoncosts.on_cost(gross_salary=25000,
...                          scheme=ucamstaffoncosts.Scheme.USS)
OnCost(salary=25000, exchange=0, employer_pension=4500,
       employer_nic=2287, apprenticeship_levy=125, total=31912)

Reference

ucamstaffoncosts.LATEST = 'LATEST'

Special value to pass to on_cost() to represent the latest tax year which has an implementation.

class ucamstaffoncosts.OnCost[source]

An individual on-costs calculation for a gross salary.

Note

These values are all rounded to the nearest pound and so total may not be the sum of all the other fields.

salary

Gross salary for the employee.

exchange

Amount of gross salary exchanged as part of a salary exchange pension. By convention, this value is negative if non-zero.

employer_pension

Employer pension contribution including any salary exchange amount.

employer_nic

Employer National Insurance contribution

apprenticeship_levy

Share of Apprenticeship Levy from this employee

total

Total on-cost of employing this employee. See note above about situations where this value may not be the sum of the others.

class ucamstaffoncosts.Scheme[source]

Possible pension schemes an employee can be a member of.

CPS_HYBRID = 'cps_hybrid'

CPS hybrid

CPS_HYBRID_EXCHANGE = 'cps_hybrid_exchange'

CPS hybrid with salary exchange

NHS = 'nhs'

NHS

NONE = 'none'

No pension scheme.

USS = 'uss'

USS

USS_EXCHANGE = 'uss_exchange'

USS with salary exchange

ucamstaffoncosts.on_cost(gross_salary, scheme, year='LATEST')[source]

Return a OnCost instance given a tax year, pension scheme and gross salary.

Parameters:
  • year (int) – tax year
  • scheme (Scheme) – pension scheme
  • gross_salary (int) – gross salary of employee
Raises:

NotImplementedError – if there is not an implementation for the specified tax year and pension scheme.