For more information on setup, see University of California GPA Calculation

As to how it calculates the GPA, it does not look at test scores, it just does the following:
  • Convert the grades earned in all college-preparatory courses ("a-g" courses) taken in 10th and 11th grades, including summer sessions: A=4, B=3, C=2, D=1. (Pluses and minuses don't count.)
  • Gives an extra point for each honors-level course, up to eight semesters.
  • Honors courses are Advanced Placement courses, Higher Level and designated Standard Level International Baccalaureate courses, transferable community college courses and UC-certified honors courses that appear on your school's course list. A grade of D in an honors course does not earn an extra point.
  • No more than two yearlong UC-approved honors-level courses taken in the 10th grade may be given extra points.
Note: Rules of the California GPA state that only 10-11th grade years are used:

Only the grades you earn in "a-g" subjects in the 10th and 11th grades - including summer sessions - are used to calculate your preliminary GPA. Courses you took in ninth grade can be used to meet the Subject Requirement if you earned a grade of C or better, but they will not be used to calculate your GPA.