Tax Calculator API

UK Tax Calculator And Salary API

We are extremely pleased to release the first version of our tax calculator API v1.0.0.

API Overview

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.

API Endpoints

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 (demo_mud8y7yhbsydug) is a demo key, and it’s only available for the day when it was generated. The demo API key is refreshed every day. Open in new tab

You need to be a premium user to get a permanent API key.

Debug mode
If you wish to inspect the results in a more reader-friendly mode, simply add a parameter to the end of the URL:
?debug=1

To be used only for de-bugging and for checking the returned values. Open in new tab

Results explained

  • 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 (80790665616) is a demo key, and it’s only available for the day when it was generated. The demo API key is refreshed every day. Open in new tab

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.


Example code

PHP

// 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 = "demo_mud8y7yhbsydug";
$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);
																									
																									
																									
																								 

JavaScript (jQuery)


        
// change the 45000 value to any yearly gross salary. Plain number, without commas
// the below API key is for demo only, and only valid today
// (it will stop working within a few hours)
        
var yearly_gross = 45000;
var api_key = 'demo_mud8y7yhbsydug';
$.get("https://www.income-tax.co.uk/api/'+api_key+'/" + yearly_gross + "/", function (data) {
            // data is the returned results, do whatever you want with it
            console.log(data);
        })
        .done(function () {
            //alert( "second success" );
        })
        .fail(function () {
            //alert( "error" );
        })
        .always(function () {
            //alert( "finished" );
        });
																									
																									
																									
																								 

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 we will send you the permanent API key right after the confirmation.

Set-up payment for premium API key:

(our website is managed by Search Intelligence Ltd)

https://pay.gocardless.com/AL0002EXEPC5B9