Use this calculator to determine your Semester Grade Point Average (SGPA). Enter the credit hours and the letter grade you received for each course you took in a semester. The calculator will automatically convert your letter grades to grade points and compute your SGPA.
var courseCounter = 0;
function addCourseRow() {
courseCounter++;
var container = document.getElementById('courseInputs');
var newRow = document.createElement('div');
newRow.className = 'course-row';
newRow.id = 'courseRow_' + courseCounter;
newRow.style.marginBottom = '10px';
newRow.style.padding = '10px';
newRow.style.border = '1px solid #eee';
newRow.style.borderRadius = '5px';
newRow.style.backgroundColor = '#f9f9f9';
newRow.style.display = 'flex';
newRow.style.alignItems = 'center';
newRow.style.flexWrap = 'wrap';
newRow.innerHTML = `
Select
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)
F (0.0)
`;
container.appendChild(newRow);
}
function removeCourseRow(buttonElement) {
var rowToRemove = buttonElement.parentNode;
rowToRemove.parentNode.removeChild(rowToRemove);
}
function calculateSGPA() {
var gradePointsMap = {
"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,
"F": 0.0
};
var totalGradePoints = 0;
var totalCreditsAttempted = 0;
var isValid = true;
var courseRows = document.querySelectorAll('.course-row');
var resultDiv = document.getElementById('sgpaResult');
resultDiv.style.color = 'red'; // Default to red for errors
resultDiv.style.backgroundColor = '#f8d7da'; // Default background for errors
resultDiv.style.borderColor = '#f5c6cb';
if (courseRows.length === 0) {
resultDiv.innerHTML = "Please add at least one course to calculate SGPA.";
return;
}
for (var i = 0; i < courseRows.length; i++) {
var row = courseRows[i];
var creditsInput = row.querySelector('input[type="number"]');
var gradeSelect = row.querySelector('select');
var credits = parseFloat(creditsInput.value);
var grade = gradeSelect.value;
if (isNaN(credits) || credits <= 0) {
resultDiv.innerHTML = "Please enter valid positive credits for all courses.";
isValid = false;
break;
}
if (!grade || grade === "") {
resultDiv.innerHTML = "Please select a grade for all courses.";
isValid = false;
break;
}
var gradePoint = gradePointsMap[grade];
// If gradePoint is undefined, it means the grade value from select is not in map, which shouldn't happen with controlled dropdown.
totalGradePoints += (credits * gradePoint);
totalCreditsAttempted += credits;
}
if (!isValid) {
return;
}
if (totalCreditsAttempted === 0) {
resultDiv.innerHTML = "Total credits attempted cannot be zero. Please enter valid credits.";
return;
}
var sgpa = totalGradePoints / totalCreditsAttempted;
resultDiv.style.color = '#155724'; // Reset color for success
resultDiv.style.backgroundColor = '#e9f7ef'; // Reset background for success
resultDiv.style.borderColor = '#d4edda';
resultDiv.innerHTML = "Your Semester Grade Point Average (SGPA) is: " + sgpa.toFixed(2) + "";
}
// Initialize with 3 course rows when the script loads
for (var i = 0; i < 3; i++) {
addCourseRow();
}
Understanding Your Semester Grade Point Average (SGPA)
The Semester Grade Point Average (SGPA) is a crucial metric that reflects your academic performance during a specific academic semester or term. Unlike the Cumulative Grade Point Average (CGPA), which considers all your academic terms, SGPA focuses solely on the courses taken within a single semester.
How SGPA is Calculated
The calculation of SGPA involves two main components for each course: the credit hours assigned to the course and the grade points corresponding to the letter grade you received. Here's the general formula:
SGPA = (Sum of [Credit Hours × Grade Points] for all courses in the semester) / (Sum of Credit Hours for all courses in the semester)
Most institutions use a 4.0 scale for grade points, where an A typically equals 4.0 points, B equals 3.0, C equals 2.0, D equals 1.0, and F equals 0.0. Some systems include plus and minus grades (e.g., A-, B+, C-) which have corresponding fractional grade points.
Example Calculation:
Let's say a student takes four courses in a semester:
Course 1: 3 Credits, Grade A (4.0 Grade Points)
Course 2: 4 Credits, Grade B+ (3.3 Grade Points)
Course 3: 3 Credits, Grade C (2.0 Grade Points)
Course 4: 2 Credits, Grade A- (3.7 Grade Points)
Step 1: Calculate Grade Points for each course:
Course 1: 3 credits × 4.0 = 12.0
Course 2: 4 credits × 3.3 = 13.2
Course 3: 3 credits × 2.0 = 6.0
Course 4: 2 credits × 3.7 = 7.4
Step 2: Sum total grade points:
12.0 + 13.2 + 6.0 + 7.4 = 38.6
Step 3: Sum total credit hours:
3 + 4 + 3 + 2 = 12
Step 4: Calculate SGPA:
SGPA = 38.6 / 12 = 3.22
Why SGPA Matters
Academic Standing: Many universities use SGPA to determine academic probation or eligibility for dean's list honors for a given semester.
Progress Tracking: It provides a clear snapshot of your performance in a specific term, helping you identify strengths and weaknesses.
Scholarship Eligibility: Some scholarships or awards may require a minimum SGPA for renewal or initial qualification.
Course Planning: A low SGPA might indicate a need to adjust your study habits or course load for future semesters.
Use this calculator to quickly assess your semester's academic standing and plan for future success!