A first-order differential equation is a mathematical equation used in mathematics, science, and engineering, and it can be solved using various methods. One commonly used approach is numerical methods, which often rely on computer programs to enhance the accuracy of solutions. Mathematical software such as MATLAB and Scilab are frequently used to solve such problems. In this research, the researcher used the Euler method and the Runge-Kutta method, which are numerical methods used to solve first-order differential equations, to compare the accuracy of the two methods through JavaScript programming. The program displays actual values, estimated values and error values. The results show that Runger-Kutta method is more accurate than Euler method for actual values, estimated values and error values with efficient representation through example and display in HTML window.