I would start by drawing up (mock screen shot) how the calculator would work with actual data values: design.
Famous quote: "If you can't solve something on the back of an envelope, don't expect the computer to do it".
After thinking about it, you'll see if what you want to do is easy, difficult, or feasible.
Perhaps using a FileMaker "List" of values and then searching that list might be one idea worth exploring.
HOPE THIS HELPS.
I see now how simple this is. Just have a table and do a find. Then clear values in the quantity field and set up a summary field at the bottom of the table.
Things are usually much easier if u design first and code later.
Glad I figured it out.