Is it appropriate to ask a professor how my grade was calculated?
You can certainly ask the professor to justify how a grade was calculated and assigned. In most universities and most systems the professor is obliged by the rules to justify to students how a grade was obtained. Moreover, minimal decent teaching practice is that the manner in which grades are to be calculated and the conditions in which the evaluation is to occur are fixed in advance and known before evaluations occur and that the calculations are reproducible by the student evaluated (there are of course particular contexts, e.g. evaluating a student with discapacities or an exam that contains an error in a problem formulation or an interruption (e.g. power outage) in its administration, in which particular modifications might have to be made).

Assigning grades according to some scheme known only to the professor is considered something bordering malpractice in many countries. In Spain, where I work, a student always has a formal right to see how exams etc. were graded and to formally protest any perceived error in their grading.