So I have attempted to create a calculator but I feel it can be optimized. If somebody can look over my code and suggest and demonstrate room for improvement I would be thankful as always. I always try to publish a solution even if it is horrible to demonstrate that I have put forth effort of my own.

Kenosis provided an excellent solution to your example, but I doubt that it meets your requirements. What are they? How much memory does your calculator have? Does it care about precedence? What happens if your input exceeds its capability? What functions does it support? How does it get its input? Are there any constraints on speed or memory? Good Luck, Bill