🎓 Instant · Accurate · Free

GPA Calculator

Calculate your Semester GPA and Cumulative GPA instantly.

1 Select your GPA scale

This determines the grading options available for each course.

2 Add your courses

Add every course from this semester with its credit hours and grade.

Course nameCredit hoursGradeRemove

Swipe down to see each course's remove button.

Add at least one course with a valid name, credit hours, and grade.

Copied to clipboard.

0.00 out of 4.0
Semester GPA 0.00
Total credits 0
Total grade points 0.00
Academic standing —
GPA position 0.00 / 4.0
0 4.0
Grade reference table

Standard 4.0-scale grading reference used across most universities.

Letter gradeGrade pointPercentage equivalentAcademic standing
CGPA calculator

Combine your previous record with this semester to get your updated CGPA.

Please fill in all four fields with valid, non-negative numbers.
0.00
Updated CGPA
Percentage to GPA converter

Get a quick estimated GPA (4.0 scale) from a percentage score.

Please enter a percentage between 0 and 100.
0.0
Estimated GPA
Download your report

Get a printable summary of your courses, grades, GPA and standing.

" ); w.document.close(); w.focus(); w.print(); });copyBtn.addEventListener("click", function () { if (!lastResultText) { runCalculation(true); } if (!lastResultText) return;function fallbackCopy(text) { var ta = document.createElement("textarea"); ta.value = text; ta.style.position = "fixed"; ta.style.opacity = "0"; document.body.appendChild(ta); ta.select(); try { document.execCommand("copy"); } catch (e) { /* no-op */ } document.body.removeChild(ta); }if (navigator.clipboard && navigator.clipboard.writeText) { navigator.clipboard.writeText(lastResultText).catch(function () { fallbackCopy(lastResultText); }); } else { fallbackCopy(lastResultText); }copyToast.classList.add("gpa-show"); window.setTimeout(function () { copyToast.classList.remove("gpa-show"); }, 2200); });/* ================================================ CGPA CALCULATOR ================================================ */ cgpaBtn.addEventListener("click", function () { [prevCgpaEl, prevCreditsEl, currentGpaEl, currentCreditsEl].forEach(function (el) { el.classList.remove("gpa-error"); }); cgpaError.classList.remove("gpa-show");var prevCgpa = parseFloat(prevCgpaEl.value); var prevCredits = parseFloat(prevCreditsEl.value); var currentGpa = parseFloat(currentGpaEl.value); var currentCredits = parseFloat(currentCreditsEl.value);var valid = true; [ [prevCgpaEl, prevCgpa], [prevCreditsEl, prevCredits], [currentGpaEl, currentGpa], [currentCreditsEl, currentCredits] ].forEach(function (pair) { var el = pair[0], val = pair[1]; if (pair[1] === undefined || isNaN(val) || val < 0 || el.value.trim() === "") { el.classList.add("gpa-error"); valid = false; } });if (prevCredits + currentCredits <= 0) valid = false;if (!valid) { cgpaError.classList.add("gpa-show"); cgpaResult.classList.remove("gpa-show"); return; }var updatedCgpa = ((prevCgpa * prevCredits) + (currentGpa * currentCredits)) / (prevCredits + currentCredits); lastCgpaValue = updatedCgpa; cgpaValueEl.textContent = updatedCgpa.toFixed(2); cgpaResult.classList.add("gpa-show"); });/* ================================================ PERCENTAGE → GPA CONVERTER ================================================ */ convertBtn.addEventListener("click", function () { percentInput.classList.remove("gpa-error"); percentError.classList.remove("gpa-show");var pct = parseFloat(percentInput.value); if (percentInput.value.trim() === "" || isNaN(pct) || pct < 0 || pct > 100) { percentInput.classList.add("gpa-error"); percentError.classList.add("gpa-show"); converterResult.classList.remove("gpa-show"); return; }var estGpa = percentToGpa(pct); converterValueEl.textContent = estGpa.toFixed(1); converterResult.classList.add("gpa-show"); });/* ================================================ DOWNLOAD GPA REPORT (native Blob download, no libraries) ================================================ */ downloadBtn.addEventListener("click", function () { var parsed = readCourses(); if (parsed.courses.length === 0) { runCalculation(true); parsed = readCourses(); } if (parsed.courses.length === 0) return;var totalCredits = 0, totalPoints = 0; parsed.courses.forEach(function (c) { totalCredits += c.credit; totalPoints += c.credit * c.points; }); var scaleMax = SCALE_MAX[scaleSelect.value]; var gpa = Math.min(totalCredits > 0 ? totalPoints / totalCredits : 0, scaleMax); var pctOfMax = scaleMax > 0 ? (gpa / scaleMax) * 100 : 0; var standingLabel = getStanding(pctOfMax).label; var dateStr = new Date().toLocaleDateString(undefined, { year: "numeric", month: "long", day: "numeric" });var rowsHtml = parsed.courses.map(function (c) { return "" + escapeHtml(c.name) + "" + c.credit + "" + c.points.toFixed(2) + ""; }).join("");var cgpaLine = lastCgpaValue !== null ? "

Updated CGPA: " + lastCgpaValue.toFixed(2) + "

" : "

Updated CGPA: Not calculated

";var html = "GPA Report" + "" + "

GPA Report

" + "

Generated on " + dateStr + "

" + "" + rowsHtml + "
CourseCredit hoursGrade points
" + "
" + "

Semester GPA: " + gpa.toFixed(2) + " / " + scaleMax.toFixed(1) + "

" + "

Total credits: " + totalCredits + "

" + "

Total grade points: " + totalPoints.toFixed(2) + "

" + "

Academic standing: " + standingLabel + "

" + cgpaLine + "
" + "";var blob = new Blob([html], { type: "text/html" }); var url = URL.createObjectURL(blob); var a = document.createElement("a"); a.href = url; a.download = "gpa-report.html"; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); });/* ================================================ LEAD GEN BUTTON (button only, no link per spec) ================================================ */ consultBtn.addEventListener("click", function () { consultBtn.textContent = "Thanks! We'll be in touch."; window.setTimeout(function () { consultBtn.textContent = "Book free scholarship consultation"; }, 2500); });/* ================================================ INIT ================================================ */ renderRefTable(); addCourseRow(); addCourseRow(); })();