Class caluculator