Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save kolos181/a359cc8bc29e3f100c60fa19f17c6b62 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RM of Dauphin Property Tax Calculator</title>
<style>
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 600px; margin: 30px auto; padding: 20px; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
h2 { text-align: center; color: #0072ce; }
.input-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 0.9em; color: #333; }
input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
button { margin-top: 20px; padding: 12px; width: 100%; font-size: 16px; background-color: #0072ce; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }
button:hover { background-color: #005bb5; }
.result { margin-top: 25px; padding: 15px; background: #f9f9f9; border-left: 5px solid #0072ce; border-radius: 4px; display: none; }
.result p { margin: 10px 0; border-bottom: 1px solid #eee; padding-bottom: 5px; display: flex; justify-content: space-between; }
.result p span { font-weight: bold; }
</style>
</head>
<body>
<h2>Property Tax Calculator</h2>
<p style="font-size: 0.8em; text-align: center; color: #666;">Rural Municipality of Dauphin</p>
<div class="input-group">
<label for="resAssessment">Residential Assessment ($)</label>
<input type="number" id="resAssessment" placeholder="e.g. 200000">
</div>
<div class="input-group">
<label for="farmAssessment">Farmland Assessment ($)</label>
<input type="number" id="farmAssessment" placeholder="e.g. 50000">
</div>
<div class="input-group">
<label for="municipalMill">Municipal Mill Rate</label>
<input type="number" id="municipalMill" step="0.0001" placeholder="Enter rate">
</div>
<div class="input-group">
<label for="schoolMill">School Division Mill Rate</label>
<input type="number" id="schoolMill" step="0.0001" placeholder="Enter rate">
</div>
<button onclick="calculateTax()">Calculate Estimated Taxes</button>
<div class="result" id="result">
<p>Residential Taxable (45%): <span id="resTaxable"></span></p>
<p>Farmland Taxable (26%): <span id="farmTaxable"></span></p>
<p>Municipal Tax: <span id="municipalTax"></span></p>
<p>School Tax (with 50% Farm Rebate): <span id="schoolTax"></span></p>
<p style="border-bottom: none; font-size: 1.2em; color: #0072ce;">Total Estimated Taxes: <span id="totalTax"></span></p>
</div>
<script>
function calculateTax() {
let resAssessment = parseFloat(document.getElementById("resAssessment").value) || 0;
let farmAssessment = parseFloat(document.getElementById("farmAssessment").value) || 0;
let municipalMill = parseFloat(document.getElementById("municipalMill").value);
let schoolMill = parseFloat(document.getElementById("schoolMill").value);
if(isNaN(municipalMill) || isNaN(schoolMill)) {
alert("Please enter the current Mill Rates to continue.");
return;
}
let resTaxable = resAssessment * 0.45;
let farmTaxable = farmAssessment * 0.26;
let municipalTax = ((resTaxable + farmTaxable) * municipalMill) / 1000;
let schoolTax = ((resTaxable * schoolMill) + (farmTaxable * schoolMill * 0.50)) / 1000;
let totalTax = municipalTax + schoolTax;
document.getElementById("resTaxable").textContent = "$" + resTaxable.toLocaleString(undefined, {minimumFractionDigits: 2});
document.getElementById("farmTaxable").textContent = "$" + farmTaxable.toLocaleString(undefined, {minimumFractionDigits: 2});
document.getElementById("municipalTax").textContent = "$" + municipalTax.toLocaleString(undefined, {minimumFractionDigits: 2});
document.getElementById("schoolTax").textContent = "$" + schoolTax.toLocaleString(undefined, {minimumFractionDigits: 2});
document.getElementById("totalTax").textContent = "$" + totalTax.toLocaleString(undefined, {minimumFractionDigits: 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