Weighted Grade Calculator for CSV
Operator: Abdulla Al Fahad. How tools are built and checked
Grading by hand rarely stops at adding up points. Homework counts for 20 percent, the lowest homework is dropped, quizzes count for another 20, the exam for the rest, and an excused absence should not drag anyone down. That is a weighted average with rules, and a spreadsheet of raw scores does not apply the rules by itself.
This calculator reads such a sheet, lets you group the assignments into categories with weights, and produces each student's course percentage, letter grade and the class statistics. You can then take away an XLSX in which every grade is a formula, so the workbook keeps working after the page is closed.
Key features
- Categories guessed from assignment names, with weights and a drop-lowest count for each
- Total-points or average-of-percentages scoring, blank as zero or skipped, excused marks
- Custom grading scale with two presets
- Class mean, median, standard deviation, pass rate and a grade distribution chart
- XLSX where grades, statistics and the distribution are formulas over a Setup sheet
- CSV of the results
How categories, drops, blanks and the scale turn scores into a grade
The sheet has one row per student and one column per assignment; the first column or one named like student or name holds the names. A row whose name is Points possible, Max, Maximum or Out of is read as the maximum points and is not graded as a student. Without such a row, each assignment defaults to 100 points and you can change it in the table. Columns count as scores when at least 60 percent of their filled cells are numbers or excused marks, so a Section or ID column is left out. Cells may hold plain numbers, thousands separators, a currency sign or a percent sign (read as the number itself, so 85% is 85 points).
Blank cells are either counted as zero or skipped, as you choose. The marks EX, excused, N/A and a dash always mean excused and are skipped, and a cell with any other text is treated as blank and counted in a warning. Assignments are grouped by category, guessed by removing a trailing number from the name, so HW 1, HW_2 and hw3 share the category HW while Midterm stands alone; you can rename any category.
Within a category, the lowest N scores by percentage are dropped, with ties dropping the earlier column first, and never all of them: at least one score always stays. A category's score is either total points earned over total points possible among the kept scores, or the plain average of the kept percentages. The course percentage is the weight-by-score sum divided by the sum of the weights that apply to that student, so a category in which the student has nothing graded is left out and the others are rescaled. Weights need not add to 100; they act as shares, and a note appears if they do not.
The scale is a list of grades with a minimum percentage, and a student gets the highest grade whose minimum is at or below their course percentage rounded to two decimals. Two presets are provided: A to F at 90, 80, 70 and 60, and A+ to F in 13 steps. Statistics are the mean, the median, the sample standard deviation, the lowest and highest percentage, the share at or above your pass mark, and a count per grade. The XLSX has Grades, Summary, Scores and Setup sheets plus three helper sheets (Pct, KeptMax and KeptPts) that work out the percentages and which scores are kept. Weights, maximums, drop counts, the scale and the pass mark live on Setup and are referenced by the formulas, so editing them recalculates every grade. The blank-cell policy and the scoring method are fixed at the time of export.
How it works
The same rules are written twice: once in code that gives the results shown on the page, and once as spreadsheet formulas. The formulas were checked against the code on a sample class under four different settings, including drops, ties, excused marks and both blank policies, and the course percentages and letters agreed for every student.
In the workbook, Pct holds each score divided by its maximum. KeptMax gives each score the maximum it still counts for, or 0 when it was dropped, by counting how many scores in the same category and row are lower, plus equal ones in earlier columns, and comparing that with the drop count on Setup. KeptPts keeps the points of the scores that still count. On the Grades sheet, two helper blocks to the right of the Letter column hold each category's weight times its percentage and the weight in use, so a category with nothing graded drops out of the average without any text entering the arithmetic.
When to use it
- Computing final grades for a class of 32 from a spreadsheet exported from a learning platform, with 8 homeworks and 2 exams
- Showing a student on 72.65 percent what dropping a second homework would do to the course grade
- Comparing total-points scoring with average-of-percent scoring when assignments have very different sizes
- Preparing a grade distribution for a department meeting
Inputs
- Drop the scores file, or paste it, or load the sample.
- Check that the right columns are ticked, and fix any category names and maximum points.
- Set each category's weight and how many lowest scores to drop.
- Choose the scoring method, how blanks count, and the grading scale.
- Read the grades and the chart, then download the XLSX or CSV.
Worked example
One student of the sample class
Ben Okoro: HW 10, 0, 15, 10 of 10, 10, 20, 10; Quizzes 12 and 14 of 20; Midterm 72; Final 69
Weights: HW 20, Quiz 20, Midterm 25, Final 35; drop 1 homework; A+ to F scaleCalculation
HW: the 0 is dropped, 35 of 40 points = 87.5%
Quiz: 26 of 40 = 65.0%
Course: (20 x 87.5 + 20 x 65 + 25 x 72 + 35 x 69) / 100 = 72.65%, grade C-Tips for best results
- Use total points when big assignments should matter more inside a category, and the average of percentages when every assignment should count equally.
- Set a category's drop count to 0 rather than removing the column when you only want to see the effect of a drop.
- Keep the Setup sheet of the exported workbook open while you adjust weights; the Grades sheet recalculates as you type.
Limits
Blank cells as zero punishes a student who has simply not handed work in yet; choose skip while a term is still in progress.
With drop-lowest, the dropped score is chosen by percentage, not by points, so a low score on a small quiz can go before a higher percentage on a large one.
The scale compares the course percentage rounded to two decimals, so 89.996 is read as 90.00 and gets the A.
Common errors and how to fix them
- "No score columns were found"
- The columns do not hold mostly numbers. Make sure scores are plain numbers and that the first row is a header.
- "N cells held text that is not a score"
- Cells like late or ? were treated as blank. Use EX for an excused score, or clear the cell.
- "The weights add up to ..."
- This is a note, not an error. Grades are still weighted shares of whatever total you gave; set the weights to sum to 100 if you want them read as percentages.
- "appears more than once"
- Two rows have the same student name. Both are graded separately, so check whether one is a duplicate row or add a distinguishing initial.
- "No grade starts at 0"
- Students below the lowest minimum get no letter. Add an F with a minimum of 0.
Best practices
- Check the Points possible row before trusting any total: a maximum typed as 10 instead of 100 turns every score above 10 into more than 100 percent.
- Treat the Setup sheet of the exported workbook as the one place to change weights and the scale, and keep the scores untouched on the Scores sheet.
Total points or average of percentages
The two scoring methods agree when every assignment in a category has the same maximum and differ when it does not. A quiz of 5 points and a test of 50 points show the gap.
- Scores 5 of 5 and 25 of 50: total points gives 30 of 55 = 54.5 percent; the average of percentages gives (100 + 50) / 2 = 75 percent.
- Total points lets the large test dominate, which matches how most syllabi describe 'all tests together'.
- Average of percentages treats each piece of work as equally important, whatever its size.
How a tie is dropped
When two scores in a category have the same percentage, the earlier column is the one dropped, so the same input always gives the same grade. Take HW 1 at 8 of 10, HW 2 at 16 of 20 and HW 3 at 9 of 10, with one drop.
- HW 1 and HW 2 are both 80 percent, so HW 1, the earlier column, is dropped.
- Total points: (16 + 9) of (20 + 10) = 83.3 percent, a B on the A to F scale.
- Average of percentages: (80 + 90) / 2 = 85.0 percent, also a B.
- Had HW 2 been dropped instead, total points would give 17 of 20 = 85.0 percent, so the tie rule matters.
Frequently asked questions
Why does the formula version need helper sheets?
Dropping the lowest scores per student needs a rank for every score. The Pct, KeptMax and KeptPts sheets hold those steps so each cell stays a short, auditable formula.
Can I change the grading scale after exporting?
Yes. The scale is a list on the Setup sheet, lowest grade first, and the letters recalculate when you edit a minimum. Keep the list in ascending order of the minimum percentage.