The Geometry of the Pins
Bowling scoring is notoriously confusing for beginners because it is not a simple linear addition. A perfect game is 300 points, but there are only 10 frames with 10 pins each. The mathematical complexity comes from the exponential bonus points awarded for Strikes and Spares.
Understanding the maximum possible score remaining in your game dictates your strategy in the late frames.
The Math of the Strike
In bowling, a Strike is not just worth 10 points. It is worth 10 points plus the total number of pins you knock down on your next two rolls. A Spare is worth 10 points plus the pins from your next one roll.
The Maximum Potential Formula
If you are in the 5th frame with 90 points, and you want to know the absolute best possible score you can finish with, you must assume you will throw a strike on every single remaining roll.
Max Possible Score = Current Score + (Remaining Frames * 30)
The Perfect Chain
Because three consecutive strikes (a "Turkey") results in 30 points for a single frame, every remaining un-bowled frame represents a maximum potential of exactly 30 points. If you have 4 frames left, your absolute ceiling is 120 points above your current score.