The formula
If your current course grade is C% before the final, the final is worth W% of your total grade, and you want to end up with target T%, you need:
F = (T - C × (1 - W/100)) / (W/100)
Example: you have 82% in the class going in. The final is worth 30%. You want a 90% in the course. You need:
F = (90 - 82 × 0.7) / 0.3 = (90 - 57.4) / 0.3 = 108.7%
Impossible. To pull an 82 up to a 90 with only 30% remaining, the math says you need 108.7%, which would require extra-credit opportunities or a generous curve.
Use the calculator above to play with scenarios
The widget above is the universal calculator, for the actual final-grade reverse-calc, this page will gain a dedicated form in the next release. In the meantime, the formula above gives you the answer in one line.