UK Tax Calculator And Salary APIWe are extremely pleased to release the first version of our tax calculator API v1.0.0.
Our tax calculator API is aimed to provide a useful platform for developers wishing to integrate the complex UK salary calculations with any third-party application. Built with simplicity and ease of use in mind, we provide an extremely simple solution to a fairly complex problem. Simply add your gross yearly salary in the parameter of our API url, and our system will execute all the complex calculations within milliseconds for you.
There are 2 API urls available that return the data in different ways: Full results, and monthly net salary.
Full results API endpoint
Below is an example of the main API endpoint that executes the calculations for a £40,000 yearly salary, and then it returns the results in a JSON format.Please note: the API key below (80790667056) is a demo key, and it's only available for the day when it was generated. The demo API key is refreshed every day. You need to be a premium user to get a permanent API key.
If you wish to inspect the results in a more reader-friendly mode, simply add a parameter to the end of the URL:
- income: This is simply your input income (yearly gross salary), broken down in yearly, monthly, weekly, daily and hourly period ( hourly periods are calculated assuming a full-time weekly 40 hours working schedule.)
- percentage: This represents the percentage of personal allowance, tax, ni, and take-home, relative to the gross yearly income (the income will always be a percentage value of 100)
- weekly_hours: These are the assumed weekly hours that we used to calculate your hourly rate. Please note: the weekly hours will not affect any other result than the hourly rate, in our calculations. All other calculations are executed independently from the weekly hours.
- working_weeks: These are the full working weeks that are in a year. This value only affects the calculations for the weekly outputs.
- personal_allowance: This is the break-down of the default personal allowance, per time periods.
- tax: This is the total tax that needs to be paid, broken down to different time periods.
- ni: This is the total National Insurance that needs to be paid, broken down to different time periods.
- taxable: This is the total taxable amount of the gross income, broken down to different time periods.
- niable: This is the total amount of the gross income that is liable for National Insurance contributions, broken down to different time periods.
- take_home: This is the NET pay that goes into the bank account, broken down to different time periods.
Monthly NET API endpoint
The API url below simply outputs the monthly net pay, after all deductions have been made, based on the yearly gross salary:Please note: the API key below (80790667056) is a demo key, and it's only available for the day when it was generated. The demo API key is refreshed every day. You need to be a premium user to get a permanent API key.
Please get in touch at [email protected] and request a permanent premium API key.
// change the 45000 value to any yearly gross salary. Plain number, without commas $yearly_gross_salary = 45000; // the below API key is for demo only, and only valid today // (it will stop working within a few hours) $api_key = "80790667056"; $external_api_url = "https://www.income-tax.co.uk/api/".$api_key."/".$yearly_gross_salary."/"; $curl_init = curl_init(); curl_setopt( $curl_init, CURLOPT_URL, $external_api_url); curl_setopt( $curl_init, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt( $curl_init, CURLOPT_CONNECTTIMEOUT, 5 ); $data = curl_exec( $curl_init ); curl_close( $curl_init ); $data_array = json_decode( $data, true ); print_r($data_array);
Permanent, premium API key
Our premium API key costs £20/month, and you can use it infinitely in your applications.
Please set-up the direct-debit via the GoCardless link below, and send us an email afterwards at [email protected] to receive a permanent API key instantly.
Set-up payment for premium API key: