Stay–cables are one of the most crucial structural elements of cable-stayed bridges. This structural element is used in the support of the bridge deck, transferring dead and live load exposed to the deck through the pylon and controls the vertical deck and horizontal pylon displacement with the help of post-tensioning forces of the stay-cables. Under the dead load of the structural and non-structural elements of the bridge, the vertical deck and horizontal pylon displacement must be almost zero. To determine the post-tensioning forces of the stay-cables, to ensure the desired displacement of deck and pylon with a trial-and-error procedure, is sometimes impossible. In this paper, we will determine the post-tensioning forces of a cable-stayed bridge’s stay-cable by developing a program that integrates a finite element analysis, and a Jaya algorithm with MATLAB codes. To achieve this aim an existing bridge was selected as an example. A three dimensional (3D) finite element model (FEM) of the selected bridge was created by SAP2000. 3D FEM of the selected bridge was repeatedly analyzed by using the Open Applicable Programming Interface (OAPI) properties of SAP2000. The results of numerical examples are presented and discussed to show efficiency of the optimization process. By minimizing the weight of the steel structure, CO2 emissions are also kept low.