Malta Salary Calculator 2024
Detailed Breakdown of Gross Salary
|
Weekly (€) |
Monthly (€) |
Yearly (€) |
Gross Salary |
|
|
|
National Insurance |
|
|
|
Tax |
|
|
|
Govt. Bonus |
€9.86** |
€42.71** |
€512.52** |
Net Salary |
|
|
|
**Not included in the net salary calculation for the period.
**Govt. Bonus is paid quarterly (€121.16 + €135.10 + €121.16 + €135.10).
const taxRates = {
single: [
{ from: 0, to: 10500, rate: 0, subtract: 0 },
{ from: 10501, to: 15800, rate: 0.15, subtract: 1575 },
{ from: 15801, to: 21200, rate: 0.25, subtract: 3155 },
{ from: 21201, to: 60000, rate: 0.25, subtract: 3050 },
{ from: 60001, to: Infinity, rate: 0.35, subtract: 9050 }
],
married: [
{ from: 0, to: 12700, rate: 0, subtract: 0 },
{ from: 12701, to: 21200, rate: 0.15, subtract: 1905 },
{ from: 21201, to: 28400, rate: 0.25, subtract: 3155 },
{ from: 28401, to: 60000, rate: 0.25, subtract: 3050 },
{ from: 60001, to: Infinity, rate: 0.35, subtract: 9050 }
],
parent: [
{ from: 0, to: 10500, rate: 0, subtract: 0 },
{ from: 10501, to: 15800, rate: 0.15, subtract: 1575 },
{ from: 15801, to: 21200, rate: 0.25, subtract: 3155 },
{ from: 21201, to: 60000, rate: 0.25, subtract: 3050 },
{ from: 60001, to: Infinity, rate: 0.35, subtract: 9050 }
]
};
function calculateTax(salary, status) {
let tax = 0;
let bracket = taxRates[status].find(b => salary > b.from && salary <= (b.to || Infinity));
if (bracket) {
tax = salary * bracket.rate - bracket.subtract;
}
return Math.max(tax, 0); // Ensure tax is not negative
}
function calculateNI(salary, age, birthyear) {
const weeklySalary = salary / 52;
if (!age) return 6.62 * 52; // Annualized NI for under 18
if (weeklySalary <= 213.54) return 21.35 * 52; if (weeklySalary > 213.55 && birthyear) {
return weeklySalary <= 423.07 ? weeklySalary * 0.1 * 52 : 42.31 * 52;
} else {
return weeklySalary <= 532.28 ? weeklySalary * 0.1 * 52 : 53.23 * 52;
}
}
function formatNumber(num) {
return num.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
}
function calculate() {
const salary = parseFloat(document.getElementById("salary").value);
const status = document.querySelector('input[name="status"]:checked').value;
const age = document.getElementById("age").checked;
const birthyear = document.getElementById("birthyear").checked;
const tax = calculateTax(salary, status);
const ni = calculateNI(salary, age, birthyear);
const netSalary = salary - tax - ni;
const weeklySalary = salary / 52;
const monthlySalary = salary / 12;
const weeklyTax = tax / 52;
const monthlyTax = tax / 12;
const weeklyNI = ni / 52;
const monthlyNI = ni / 12;
const weeklyNet = netSalary / 52;
const monthlyNet = netSalary / 12;
// Format numbers with comma as thousand separator
document.getElementById("grossWeekly").innerText = formatNumber(weeklySalary);
document.getElementById("grossMonthly").innerText = formatNumber(monthlySalary);
document.getElementById("grossYearly").innerText = formatNumber(salary);
document.getElementById("niWeekly").innerText = formatNumber(weeklyNI);
document.getElementById("niMonthly").innerText = formatNumber(monthlyNI);
document.getElementById("niYearly").innerText = formatNumber(ni);
document.getElementById("taxWeekly").innerText = formatNumber(weeklyTax);
document.getElementById("taxMonthly").innerText = formatNumber(monthlyTax);
document.getElementById("taxYearly").innerText = formatNumber(tax);
document.getElementById("netWeekly").innerText = formatNumber(weeklyNet);
document.getElementById("netMonthly").innerText = formatNumber(monthlyNet);
document.getElementById("netYearly").innerText = formatNumber(netSalary);
}