In this research, an optimization and improvement of gas spring design is discussed. The gas spring is used as a suspension component of an energy storing prosthetic knee. The gas spring replaces the quadricep muscles of transfemoral amputee. A deterministic and a stochastic optimization is proposed in this research. Both models are used to determine the optimal design variables of the gas spring: cylinder diameter, cylinder length, extension stroke, and compression stroke. The optimal design variables resulted from the deterministic optimization model must be further analyzed to determine the effect of its variation to the objective function. Monte Carlo simulation is used to determine the effect of such variation and making improvement when necessary. Process capability index (Cp) is used as a criteria to make such improvement considering the contribution to variation of design variables to the objective function. Stochastic optimization is proposed to find the optimal design variables by taking into consideration the randomness of its parameters. The objective function of the stochastic optimization is to maximize the capability process. Both Monte Carlo simulation and stochastic optimization was solved using Oracle Crystal Ball Software. From the simulation, the reduction of compression stroke and extension stroke standard deviations resulted in 30% improvement of energy storage standard deviation. The Cp is also improved about 70% from 0.99 to 1.44. The stochastic optimization resulted in extension stroke and compression stroke which are shorter than deterministic optimization with 1.25 process capabilty.