I'm trying to figure out the best gear ratio for my 20 inch frame
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
One may assume that you're a rider somewhere between 5'9 and 6'1. The best gear ratio for *SPEED will depend on your ability for a) high cadence and b) power in harder gears.
Since I'm predominantly a roadie, I'll provide an answer based on road cycling / TT alone. Let me know if this is the incorrect context.
Since we are talking about speed, I'll start with the harder gears (big ring in front and the small gear in the back).
A lot of bikes ship with compact chainsets (a fairly recent trend have brought back doubles, 52s) which are a 50-34. That means that the big ring will have 50 teeth on it. For every pedal stroke, you will feed 50 gear linkages through your rear cassette. Thus for SPEED, for the fastest riding, you'll want your chain on the smallest gear in the back, which would typically be an 11 (or a 12, but let's assume an 11). So, if you're on the 50, for every pedal stroke you will force 50 chainlinks through an 11 tooth gear, which will turn the wheel
50 div 11 times. If it's a typical 700c wheel with 23 road tyres, that's usually around say
2.098 metres per turn, or
9.539 metres per pedal stroke.
Get that to 100 cadence (100 pedal strokes per minute, and you'll be cruising at over 57kph) ... ; But, unless you're a pro, you'll probably not be able to do that on the flat.
Cadence. Cadence simply is the name for the number of pedal strokes you can do per minute. If you are better able to pedal at a high rate than at grinding a difficult gear, then you might get your bike above the same speed mentioned above, by spinning a 50 chainring through a 16 gear at about 147 cadence. I know of track riders who ride fixed gear 48 on 16 and in sprints can get to 180 cadence, which is over 75kph.
*SPEED: Assumes the fastest speed you can ride the bike.
So, unless you really really know your abilities very well, and want to fine-tune your bike to be specifically fast for your abilities, I would recommend you look no further than perhaps the simple basic compact (50-34) on a 12-28 cassette.
You'll be faster up hills once you build your strength, and you'll hardly ever spin out your hardest gear once you've built your cadence.