Main Content Region

GPA Calculator

GPA Calculator
Current Term Classes # of Units Letter Grade Grade Points Compute Reset
CSUSB Course #1
CSUSB Course #2
CSUSB Course #3
CSUSB Course #4
CSUSB Course #5
CSUSB Course #6
CSUSB Course #7
CSUSB Course #8
CSUSB Course #9
CSUSB Course #10
CSUSB Course #11
CSUSB Course #12
CSUSB Course #13
CSUSB Course #14
CSUSB Course #15
CSUSB Course #16
CSUSB Course #17
CSUSB Course #18
CSUSB Course #19
CSUSB Course #20
Grade Points
Total # of Units Grade Point Average Total Grade Points Reset

Fill in either the Cumulative Grade Point Average column or the Cumulative Grade Points column, but not both.

Cumulative GPA
CSUSB / Transfer Work Semester Converts to Quarter Units Attempted / GPA Units Cumulative Grade Point Average Cumulative Grade Points Compute Reset
CSUSB
Transfer School #1
Transfer School #2
Transfer School #3
Final GPA
Total # of Units Final Grade Point Average Final Grade Points Reset

(function($) { // Initialize grade point scale var gp_scale = { 'A+': 4.0, 'A': 4.0, 'A-': 3.7, 'B+': 3.3, 'B': 3.0, 'B-': 2.7, 'C+': 2.3, 'C': 2.0, 'C-': 1.7, 'D+': 1.3, 'D': 1.0, 'D-': 0.7, 'F': 0 }; // Handle 'Compute' button click for #gpa-input $('#gpa-input input[type="button"][value="Compute"]').click(function() { // Get unit and grade values from input var units = $(this).closest('tr').find('.units').val(); var grade = gp_scale[$(this).closest('tr').find('.grade').val()]; // Calculate Grade Points if values are available if (units && grade != undefined) { $(this).closest('tr').find('.grade-points').val(units * grade); } // Calculate GPA, etc. after each new entry calculateGPA(); }); // Handle 'Compute' button click for #transfer-input $('#transfer-input input[type="button"][value="Compute"]').click(function() { // Convert Semester to Quarter Units if ($(this).closest('tr').find('.term').val() == 'semester') { $(this).closest('tr').find('.term').val('quarter'); $(this).closest('tr').find('.units').val($(this).closest('tr').find('.units').val() * 1.5); } // Get converted units var units = parseFloat($(this).closest('tr').find('.units').val()); // If a GPA is filled in, calculate Cumulative Grade Points if ($(this).closest('tr').find('.gpa').val()) { // Units * GPA = Grade Points $(this).closest('tr').find('.grade-points').val(units * $(this).closest('tr').find('.gpa').val()); } // If Grade Points is filled in, calculate GPA else if ($(this).closest('tr').find('.grade-points').val()) { // Grade Points / Units = GPA $(this).closest('tr').find('.gpa').val($(this).closest('tr').find('.grade-points').val() / units); } // Calculate Final GPA, etc. after each new entry calculateFinalGPA(); }); // Handle 'Reset' button click $('#gpa-input input[type="reset"], #transfer-input input[type="reset"]').click(function(e) { e.preventDefault(); $(this).closest('tr').find('input[type="text"], select').val(''); }) /* * @desc Calculate total quarter units, GPA, and total grade points. * Called after every new entry is computed. */ function calculateGPA() { var total_units = 0; var total_gp = 0; var gpa_dividend = 0; var gpa_divisor = 0; // Find and set the sum of units for all courses $('#gpa-input .units').each(function(){ if ($(this).val()) { total_units += parseFloat($(this).val()); } }); $('#average-total .units').val(total_units); // Calculate and set the Grade Points / Average $('#gpa-input tr').each(function() { if ($(this).find('.units').val() && $(this).find('.grade-points').val()) { gpa_dividend += parseFloat($(this).find('.grade-points').val()); gpa_divisor += parseFloat($(this).find('.units').val()); } }); $('#average-total .grade-points').val(gpa_dividend); $('#average-total .gpa').val(gpa_dividend / gpa_divisor); } /* * @desc Calculate Total Units, Final GPA, and Final Grade Points. * Called after every new transfer entry is computed. */ function calculateFinalGPA() { // Account for units from the current term, if they exist var total_units = $('#average-total .units').val() ? parseFloat($('#average-total .units').val()) : 0; // Add all transfer work units $('#transfer-input .units').each(function() { if ($(this).val()) { total_units += parseFloat($(this).val()); } }); // Set Total Units $('#transfer-total .units').val(total_units); // Account for grade points from current term, if they exist var final_gp = $('#average-total .grade-points').val() ? parseFloat($('#average-total .grade-points').val()) : 0; // Add cumulative transfer grade points $('#transfer-input .grade-points').each(function() { if ($(this).val()) { final_gp += parseFloat($(this).val()); } }); // Set Final Cumulative Grade Points $('#transfer-total .grade-points').val(final_gp); // Calculate Final GPA if ($('#transfer-total .grade-points').val() && $('#transfer-total .units').val()) { $('#transfer-total .gpa').val($('#transfer-total .grade-points').val() / $('#transfer-total .units').val()); } } })(jQuery);