Make a spreadsheet set up with test dates as rows, student grades as columns.
Use data sort to sort all of the students scores top to bottom for each student. That way all of the lowest scores will be at one end of the column.
Sum the cells containing the lowest grades by student and apply your grade calculation formula.
I meant, sum the columns using a formula that omits the lowest grades (which should be the same rows of each column after you sort).