trim paint calculation