Colrain CPA Income Exemption Calculator
Use our calculator to figure out if you qualify for the senior and/or income exemption.
Check the box below if you are over 60 years of age:
Now enter the number of people in your household, including yourself. This should be a number between 1 and 8.
import re
from js import document
def write_to_page():
senior = {1: 69020,
2: 78880,
3: 88740,
4: 98600,
5: 106488,
6: 114376,
7: 122264,
8: 130152}
notsenior = {1: 55216,
2: 63104,
3: 70992,
4: 78880,
5: 85190,
6: 91501,
7: 97811,
8: 104122}
amt = 0
age = document.querySelector('input[type=checkbox]:checked')
if age == None:
age = 'unchecked'
else:
age = 'checked'
val = Element('input-text').element.value
try:
if isinstance(int(val), int):
val = int(val)
if 1 <= val <= 8:
if age == 'unchecked':
amt = notsenior.get(val)
else:
amt = senior.get(val)
else:
manual_div = Element("manual-write")
manual_div.element.innerHTML = "Input is not between 1 and 8. Please try again.
"
except ValueError:
manual_div = Element("manual-write")
manual_div.element.innerHTML = "Input is not between 1 and 8. Please try again.
"
if amt != 0:
cur_str = "${:,.0f}".format(amt)
manual_div = Element("manual-write")
manual_div.element.innerHTML = "If your income is below " + cur_str + " you are exempted from the CPA surcharge.
"