A graphical user interface (GUI) is developed using Matlab and Fortran in order to calculate reflection and transmission coefficients of a layered medium, and optimize reflection and transmission in given ranges of parameters. Reflection and transmission of electromagnetic waves by a layered medium is in the scope of undergraduate/introductory graduate level electromagnetics courses and has well-known straightforward solutions. The main emphasis of this package is to let students learn how the optimization for a problem, commonly taught at the undergraduate level, can lead to useful applications and that various applications can also be attempted and fostered using the knowledge they gained through their education. A graphical interface is then necessary to allow ease of use for applications without a need for re-programming or teaching optimization at this early stage of teaching. The developed program provides an easy to use interface to define and visualize the geometry of the problem, and display the solutions for reflection and transmission coefficients, as well as the field distributions in the medium. Furthermore, another module of the program helps the user define parameters to sweep and optimizes reflection or transmission for a given target value within the given ranges of sweeping parameters. In this contribution, algorithms to calculate fields in a layered medium due to normally incident plane waves have been described and a software package that is developed based on these algorithms has been demonstrated.