First, Add grade points that you got in each subject.
Then divide it by the number of subjects.
That is your CGPA.

For example:
Let's say there are five subjects. 
Grade points for 5 subjects are:
Subject 1: 7,
subject 2: 8,
subject 3: 9,
subject 4: 9,
subject 5: 6

Add them: 7+8+9+9+6= 39
Divide the sum by 5 i.e. 39/5 = 7.8
Therefore, Overall CGPA is 7.8
First know your grade points in each subject.Then add them all.After doing the addition, divide the sum by the number of subjects you are having. This is your CGPA.