# High School GPA Calculator

## GPA calculation

The GPA is calculated as a weighted average of the grades, when the number of credit/hours is the weight and the numeric grade is taken from the GPA table.

The GPA is equal to the sum of the product of the credit hours weight (w) times the grade (g):

*GPA* = *w*_{1}×*g*_{1}+* w*_{2}×*g*_{2}+* w*_{3}×*g*_{3
}+ ... + * w*_{n}×*g*_{n}

The credit hours weight (w_{i}) is equal to the credit hours of the class divided by the sum of the credit hours of all the classes:

*w*_{i}*= c*_{i}
/ (*c*_{1}*+c*_{2}*+c*_{3}*+...+c _{n}*)

## GPA table

Grade | GPA |
---|---|

A | 4.00 |

B | 3.00 |

C | 2.00 |

D | 1.00 |

F | 0 |

P (pass) | - |

NP (no pass) | - |