Assessments in the Gradebook are grouped by categories for marking. Categories are averaged based on the weighting assigned on the settings page to get a students average. For example, if you have 2 categories, Quizzes and Homework, the average would be calculated as "studentAverage = (QuizAverage * QuizWeighting + HomeworkAverage * HomeworkWeighting) / (QuizWeighting + HomeworkWeighting)". If a category has no assessments it is not included in the average.
Now, let's take a look into how each category average is calculated. Within a category, each summative assessment is averaged -- formative assessments do not contribute to the overall grade. To customize how much a given summative assessment is worth within the category you can assign a custom weighting to it, by default this is set to 1. These weighting act like a multiplier and an assessment with 2x weighting will affect the average twice as much as an assessment with 1x weighting.
Extra credit assessments are a way that you can acknowledge when a student goes above and beyond what's expected. An extra credit assessment does not add itself to the number of assessments in a category. This means that if you have 3 regular assessments and 1 extra credit assessment, then the sum of the 4 assessments would be divided by 3 to get the category average. Note: When you have extra credit assessments it is possible for your students to have a grade of > 100%.
For each assessment, the last attempt for each student is taken for their final grade. If the last attempt is either omitted or ungraded then the assessment will not be counted towards their average.