Understanding the hydraulic behavior of soil is important for describing and understanding hydrological cycles. Measuring the soil hydraulic properties and its application in models related to the movement of water in the soil plays a fundamental role in solving a large number of water management problems such as irrigation, drainage, runoff from rain, erosion control, and the traort of solutes and contaminants. Soil water retention curve indicates different soil moisture conditions, so that soil moisture can be determined in a field by determining the soil water retention curve. Also it can determine the amount of available water for the plant in a soil layer. In this study, the MATLAB-R2017a and HYDRUS-2d/3d package were used to calculate and optimize the parameters of van Genuchten-Mualem equation using an inverse solution. Initially, the values of van Genuchten- Mualem's parameters were predicted by entering the percentage of sand, clay, and soil silt along with the soil water content in field capacity point(FC) in the ROSETTA software. Then, in order to calculate the optimal parameters of soil water retention curve, a program code was first written in MATLAB software. in the first part, the infiltration data measured by the Double-Rings infiltrometer in the field, along with the soil water content in field capacity point (FC), measured in the laboratory as input data and height of ponding water on the central cylinder (20 cm) soil as an upper boundary condition and free drainage as a lower boundary condition were used. The simulation time was also defined as the duration of the experiment in the field and the depth of the soil was 150 cm. Then in the second part, the MATLAB program code (FUNCTION), which is responsible for optimizing the parameters, was coded and the optimization condition was the least squares of the error between the measured data and the estimated infiltration data with the solution of the Richards equation in a one-dimensional mode defined in the MATLAB Software.Regarding HYDRUS, after defining problem in this package, with inverse solution soil hydraulic parameters were optimized. Finally, these parameters were compared with RETC’s parameters. The results showed that this code was able to estimate parameters of van Genuchten-Mualem model accurately. Additionally, The MATLAB program code in comparison with RETC and HYDRUS package in estimating soil hydraulic parameters has acceptable accuracy in estimating parameters of Van Genuchten-Mualem model