Skip to main content
Known Participant
June 13, 2023
Answered

Staff cost calculator help

  • June 13, 2023
  • 2 replies
  • 427 views

Hi,

 

I am trying to create a PDF cost to employer calculation form.

 

I have calculated the employer's pension contribution, but I am stuck on calculating the NI employer's contribution and how to set this up.

 

So I guess a kind of IF statement or equivalent e.g.

 

So I currently have (annualsalary) field and then a sub field called (annualsalaryNI) which is hidden where I have deducted the first £9,100 from the annual salary field which is currently exempt from NI contributions then anything else from this which then  exceeds £9,100 needs to be multiplied by 13.8%.

 

Can anyone help at all?

 

Thanks

J

Correct answer Nesa Nurani

To multiply anything above 9100 by 13.8% (0.138) you can use something like this:

var annual = Number(this.getField("annualsalary").valueAsString);
var total = 0;
if(annual > 9100)
total = (annual - 9100) * 0.138;
event.value = total;

2 replies

Participant
October 1, 2025

You can calculate the employer’s National Insurance contribution in your PDF form just like the pension contribution on Calcolopensionenetta first deduct the exempt threshold (e.g., £9,100) from the annual salary, then multiply the remainder by 13.8%. Using a simple IF statement in your PDF script ensures only the taxable portion is calculated, keeping it accurate and automatic.

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
June 13, 2023

To multiply anything above 9100 by 13.8% (0.138) you can use something like this:

var annual = Number(this.getField("annualsalary").valueAsString);
var total = 0;
if(annual > 9100)
total = (annual - 9100) * 0.138;
event.value = total;

Jason1985Author
Known Participant
June 13, 2023

This worked perfectly thank you so much Nesa!

 

Really appreciate your help with this! 🙂