How Canvas calculates weighted grades
Before learning more about weighted grade calculations, please ensure that you're familiar with the topics covered in the following guides:
Weighting assignments using points
If you're not using assignment groups, you can use the point values of your assignments to indicate the weight of specific assignments. For example, if attendance and participation is worth 25% and you have three homework assignments that together are worth 30% towards your students' grades, you could set up an assignment in Canvas for attendance and participation worth 25 points and three homework assignments worth 10 points each like in the example image below.

Weighting assignments using groups
Another option for calculating weights is to use assignment groups. Assignment groups allow you to organize your assignments list and tell Canvas what percentages to use for your assignments without having to calculate point values individually.
For more on how to set up and weight assignment groups, see the following guides:
As an example, if attendance and participation is worth 25% and you have three homework assignments that together are worth 30% towards your students' grades, you could set up two assignment groups: one for attendance and participation weighted at 25% and one for homework assignments weighted at 30%. Within the attendance and participation group would be a single assignment worth 100 points and within the homework assignments group would be three different assignments each worth 100 points. Canvas would then do all of the calculations using the percentages to determine the students' final grade.

If any of the assignments in a group should have a higher impact on your students' scores, you can also set the point values of the assignments within a group to reflect that. In the example image below, the "Paper 1" assignment group worth 20% of the final grade contains two assignments: one for students to submit a draft of their paper and the other for students to submit the edited copy. The draft is worth 25 points, while the edited submission is worth 75 points, so the student's score on the edited submission will be weighted more heavily during calculations, while the two assignments will still collectively be worth 20% of the total grade.

The following quoted text from the Canvas Instructor Guide provides more details about how grades are calculated when using assignment groups:
Within each assignment group, a percentage is calculated by dividing the total points a student has earned by the total points possible for all assignments in that group.
For example, if an assignment group included three assignments totaling 25 points, and a student's scores totaled 15 points, the student would earn 60% for the assignment group (15/25). This percentage is then multiplied by the selected group weight. Each assignment group calculation is added together to create the final grade.
For example, an instructor may create three assignment groups (A, B, and C) weighted at 20%, 50%, and 30%, respectively. The total score equation for a course with three assignment groups would be (percentage A x weight A) + (percentage B x weight B) + (percentage C x weight C) = final course percentage. If a student scores 75% in Group A, 98% in Group B, and 87% in Group C, the final score would be calculated as (.75 x .20) + (.98 x .50) + (.87 x .30) = .901, or 90.1%.
The final score calculation is changed if there are no graded items in an assignment group. In this case, all assignment groups with graded items will be divided by their combined weight, and the assignment groups without graded items are removed from the equation. If the previous example were adjusted so Group C contained no graded discussions, assignments, or quizzes, the calculation for final score would be [(.75 x .20) + (.98 x .50)] ÷ .70 = .9143, or 91.43%.
(From How do I weight the final course grade based on assignment groups?)