Average calculator with optional weighted grading