Tax Calculator
About this app
A comprehensive, user-friendly and customizable tax calculator.
The Best Australian Income PAYG Tax Calculator 🧮 The Best Australian Income PAYG Tax Calculator 🧮 What is your total income for the year? (gross, including superannuation) Calculate Tax Tax Amount:
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>The Best Australian Income PAYG Tax Calculator</title>
<meta name="description" content="A comprehensive, user-friendly and customizable tax calculator.">
<meta name="keywords" content="tax calculator, calculator, finance, income tax, user-friendly">
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Lato', sans-serif;
background: #f5f5f5;
color: #333;
margin: 0;
padding: 0;
}
.calculator {
max-width: 600px;
margin: 0 auto;
background: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.15);
}
.calculator h2 {
font-size: 24px;
font-weight: 700;
text-align: center;
margin-bottom: 20px;
}
.calculator label {
font-weight: 700;
}
.calculator input[type="number"],
.calculator select {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
margin-bottom: 15px;
}
.calculator button {
background: #007bff;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
}
.calculator button:hover {
background: #0056b3;
}
.result {
font-size: 20px;
font-weight: 700;
margin-top: 20px;
}
.error {
color: red;
margin-top: 10px;
}
.deduction-group {
margin-bottom: 15px;
}
.visualization {
margin-top: 20px;
padding: 10px;
background-color: #f5f5f5;
border-radius: 5px;
display: flex;
justify-content: space-between;
align-items: center;
}
.visualization-label {
font-weight: 700;
}
.visualization-bar {
width: 100%;
height: 20px;
background-color: #007bff;
border-radius: 5px;
}
.visualization-fill {
height: 100%;
background-color: #0056b3;
border-radius: 5px;
}
.visualization-amount {
font-weight: 700;
margin-left: 10px;
}
</style>
</head>
<body>
<div class="calculator">
<h2>🧮 The Best Australian Income PAYG Tax Calculator 🧮</h2>
<div class="form-group">
<label for="income">What is your total income for the year? (gross, including superannuation)</label>
<input type="number" id="income" class="form-control" placeholder="Enter your income">
</div>
<!-- Rest of the form fields -->
<button id="calculate">Calculate Tax</button>
<div class="result" id="taxAmount"></div>
<div class="error" id="errorMessage"></div>
<div class="visualization" id="visualization">
<div class="visualization-label">Tax Amount:</div>
<div class="visualization-bar">
<div class="visualization-fill" id="visualizationFill"></div>
</div>
<div class="visualization-amount" id="visualizationAmount"></div>
</div>
<canvas id="chart"></canvas>
</div>
<script type="text/javascript">
// Existing code
// ...
// ...
function createChart(data) {
var canvas = document.getElementById("chart");
var ctx = canvas.getContext("2d");
var chartWidth = canvas.width;
var chartHeight = canvas.height;
var barSpacing = 10;
var barWidth = (chartWidth - (barSpacing * (data.length - 1))) / data.length;
var maxValue = Math.max(...data);
var barColors = ["#007bff", "#0056b3", "#00a5ff", "#00d8ff", "#00ffff", "#00ffbf", "#00ff80", "#00ff40", "#00ff00", "#40ff00"];
ctx.clearRect(0, 0, chartWidth, chartHeight);
for (var i = 0; i < data.length; i++) {
var barHeight = (data[i] / maxValue) * chartHeight;
var x = (barWidth + barSpacing) * i;
var y = chartHeight - barHeight;
ctx.fillStyle = barColors[i % barColors.length];
ctx.fillRect(x, y, barWidth, barHeight);
}
}
function updateChart(tax) {
var data = [tax];
createChart(data);
}
function calculateTax() {
// Existing code
// ...
// ...
if (tax !== "Tax rates for non-resident and part-year resident are not included in this calculator.") {
var explanation = "Your tax amount is calculated using the following steps:\n\n";
explanation += "1. Determine your residency status: " + residencyStatus + "\n";
explanation += "2. Determine your filing status: " + filingStatus + "\n";
explanation += "3. Calculate your taxable income: " + taxableIncome + "\n";
explanation += "4. Apply the applicable tax brackets and rates to calculate the tax amount.\n";
explanation += "5. Deduct any applicable offsets and rebates.\n";
explanation += "6. The final tax amount is: $" + tax.toFixed(2) + "\n";
document.getElementById("taxAmount").textContent = "Your tax amount as a " + residencyStatus + " " + filingStatus + " is $" + tax.toFixed(2);
var visualizationFill = document.getElementById("visualizationFill");
var visualizationAmount = document.getElementById("visualizationAmount");
var maxTax = 100000;
var fillPercentage = (tax / maxTax) * 100;
visualizationFill.style.width = fillPercentage + "%";
visualizationAmount.textContent = "$" + tax.toFixed(2);
updateChart(tax);
document.getElementById("errorMessage").textContent = explanation;
} else {
document.getElementById("taxAmount").textContent = "";
document.getElementById("errorMessage").textContent = tax;
document.getElementById("visualization").style.display = "none";
var canvas = document.getElementById("chart");
var ctx = canvas.getContext("2d");
ctx.clearRect(0, 0, canvas.width, canvas.height);
}
}
document.addEventListener("DOMContentLoaded", function() {
document.getElementById("calculate").addEventListener("click", calculateTax);
});
</script>
</body>
</html>
NEW APPS
These are apps made by the community!