sum of squares treatment calculator