Skip to content

Instantly share code, notes, and snippets.

@kolos181
Created January 12, 2026 18:14
Show Gist options
  • Select an option

  • Save kolos181/990ece23582de4094feaf28326fb90be to your computer and use it in GitHub Desktop.

Select an option

Save kolos181/990ece23582de4094feaf28326fb90be to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>RM of Dauphin Property Tax Calculator</title>
<style>
body { font-family: Arial, sans-serif; max-width: 600px; margin: 30px auto; padding: 0 15px; }
h2 { text-align: center; }
label { display: block; margin-top: 15px; font-weight: bold; }
input, select { width: 100%; padding: 8px; margin-top: 5px; font-size: 14px; }
button { margin-top: 20px; padding: 10px 15px; width: 100%; font-size: 16px; background-color: #0072ce; color: white; border: none; border-radius: 5px; cursor: pointer; }
button:hover { background-color: #005bb5; }
.result { margin-top: 20px; padding: 15px; background: #f0f0f0; border-radius: 5px; }
.result p { margin: 8px 0; }
</style>
</head>
<body>
<h2>RM of Dauphin Property Tax Calculator</h2>
<label for="resAssessment">Residential Assessment ($)</label>
<input type="number" id="resAssessment" placeholder="Enter residential portion of your property assessment">
<label for="farmAssessment">Farmland Assessment ($)</label>
<input type="number" id="farmAssessment" placeholder="Enter farmland portion of your property assessment">
<label for="resPercent">Residential Tax Percentage (%)</label>
<input type="number" id="resPercent" value="45">
<label for="farmPercent">Farmland Tax Percentage (%)</label>
<input type="number" id="farmPercent" value="26">
<label for="municipalMill">Municipal Mill Rate</label>
<input type="number" id="municipalMill" placeholder="Enter municipal mill rate">
<label for="schoolMill">School Division Mill Rate</label>
<input type="number" id="schoolMill" placeholder="Enter school division mill rate">
<label for="farmlandRebate">Farmland School Tax Rebate (%)</label>
<input type="number" id="farmlandRebate" value="50">
<button onclick="calculateTax()">Calculate Taxes</button>
<div class="result" id="result" style="display:none;">
<p><strong>Residential Taxable Assessment:</strong> $<span id="resTaxable"></span></p>
<p><strong>Farmland Taxable Assessment:</strong> $<span id="farmTaxable"></span></p>
<p><strong>Municipal Tax:</strong> $<span id="municipalTax"></span></p>
<p><strong>School Tax:</strong> $<span id="schoolTax"></span></p>
<p><strong>Total Estimated Taxes:</strong> $<span id="totalTax"></span></p>
</div>
<script>
function calculateTax() {
// Get input values
let resAssessment = parseFloat(document.getElementById("resAssessment").value) || 0;
let farmAssessment = parseFloat(document.getElementById("farmAssessment").value) || 0;
let resPercent = parseFloat(document.getElementById("resPercent").value) / 100;
let farmPercent = parseFloat(document.getElementById("farmPercent").value) / 100;
let municipalMill = parseFloat(document.getElementById("municipalMill").value);
let schoolMill = parseFloat(document.getElementById("schoolMill").value);
let farmlandRebate = parseFloat(document.getElementById("farmlandRebate").value) / 100;
// Validation
if(isNaN(municipalMill) || isNaN(schoolMill)) {
alert("Please enter valid municipal and school mill rates.");
return;
}
// Calculate taxable assessments
let resTaxable = resAssessment * resPercent;
let farmTaxable = farmAssessment * farmPercent;
// Municipal tax (full taxable assessment)
let municipalTax = ((resTaxable + farmTaxable) * municipalMill) / 1000;
// School tax
// Residential portion: full school tax
// Farmland portion: rebate applied
let schoolTax = ((resTaxable * schoolMill) + (farmTaxable * schoolMill * (1 - farmlandRebate))) / 1000;
// Total estimated tax
let totalTax = municipalTax + schoolTax;
// Display results
document.getElementById("resTaxable").textContent = resTaxable.toFixed(2);
document.getElementById("farmTaxable").textContent = farmTaxable.toFixed(2);
document.getElementById("municipalTax").textContent = municipalTax.toFixed(2);
document.getElementById("schoolTax").textContent = schoolTax.toFixed(2);
document.getElementById("totalTax").textContent = totalTax.toFixed(2);
document.getElementById("result").style.display = "block";
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment