To calculate what your final grade will be depending on what grade you receive on your final exam, use the following equation:

(Grade you receive on final - Grade in class before final) x % final is worth = G

Grade in class before final + G = Final grade overall

So...for example, if you have a 90% before the final and you get an 80% on the final and your final is worth 10%, you would use the equation as follows:
(80 - 90) x 0.10 = -1
90 + (-1) = 89%

You can algebraically rearrange this equation to figure out what you need to achieve on your final in order to get a certain grade overall.

So...for example, if you have an 82% in the class and you want to raise it to an 83% (from a B- to a B), you would use the equation as follows:
First figure out what percent you need to raise your grade from an 82 to an 83. 82+x = 83 where you solve for x and get 1
Now rearrange the first equation above, where G is 1. Therefore:
(G/%final is worth) + Grade in class before final = 1/0.10 +82 = 92. You would need to get a minimum of 92% to raise your grade to an 83%.