As a professional framer for 14+ years, I have to say... HUH???
What kind of problem could you possibly be having? Math is math and this is all simple math.
If you have an image of 16x20, then that is your opening size. If you want to add 3" around that opening, you add 6" to the 16 and 6" to the 20. Thus the overall size of the mat (and also the frame) is now 22x26.
If you are trying to fit an image into a fixed size frame then you just reverse it.
A 20x24" frame minus a 16x20" opening would give you 4" left over and thus 2" per side.
Why are you messing around trying to calculate minute fractions?
A good old piece of paper and a pencil will work just as well as inventing a program to do it.
Of course, there are small thingys called desk calculators which can do the math for you without creating a computer program to do it which is sort of like using a howitzer to kill a mouse.
Seriously, I just checked out your program and while it is nicely done, I still can't see the problem you are having doing simple math? If you want 1/4" overlap of your art, you just subtract 1/2" from the total image size and there you are... the opening of your mat.
As for the size of the mat you need, that is entirely up to you. There are no fast rules for how big the mat borders should be.
Your program asks you to input a board size into fields. This seems irrelevent here as you stated you are having problems trying to figure what size board you need yet the program is asking you to put in a board size. Seems to be self answering, doesn't it?
Again, if you want a bottom weighted mat, just add whatever more you would like it to be.
This is all very basic math like the sort taught in the lower grade school classes.
Please, forgive me for this diatribe, but I really don't understand where you are having trouble figuring the mat dimensions.