How to Calculate GPA from Percentage?

How do I calculate my GPA grade if I have 87% regarding average? I don't know if there's some way to work it out.
I basically don't know how to calculate the GPA from percentages, I think there is some sort of formula I should use to calculate it but I'm not sure. My brother told me once how to calculate the GPA value from percentage but I forgot.

You can't directly convert percentage to GPA, there is just now a single formula that can do that. I give you an example, you could get an 85% by getting half A's and half B's, and that would be a 3.5 GPA. In order to calculate your GPA, you need to convert each class to the GPA system separately, then the next step is multiply that by the number of credits the class was worth, next you have to add them all up, and finally divide that number by the total number of credits. In case you're still lost, this chart will be useful to calculate your GPA: