How to convert GPA to CGPA
Your CGPA is just a credit-weighted average of every semester GPA. For each semester multiply GPA × total credit hours to get the quality points, then divide the sum of all quality points by the sum of all credit hours.
Example: If Semester 1 GPA = 3.5 (18 credits) and Semester 2 GPA = 3.7 (18 credits), CGPA = (3.5×18 + 3.7×18) / 36 = 3.60.
Different credit loads
If a semester has 3.00 over 12 credits and the next has 4.00 over 18 credits, the combined CGPA is (36 + 72) ÷ 30 = 3.60, not 3.50. The semester with more credits contributes more.
Previous cumulative results
You can use an earlier cumulative GPA as one row with its full counted credit total. Add only semesters completed after it. Do not combine an already cumulative GPA with all of the same earlier semester rows.
Repeats, transfers and rounding
Use your degree record for which credits count. Repeated courses and transfer grades may have special treatment. Keep full precision until the final answer; rounded semester GPAs can produce a small difference from the official transcript.