I'm trying to do a formula like this for shaker doors. I want to do 2 1/4" stile and rails. I would like to be able to enter in my door height and width and then find out what my stile and rail lengths are. Also in the formula I would like to find out what my panel size is and how much b.f is needed based on a waste factor as well. I've seen a formula like this before and you could enter how many doors or drawer faces were needed and it would calculate b.f and also how many of each part were needed. Let me know if you can help out!