The inverted pendulum is a highly nonlinear and open-loop unstable system. This means that standard linear techniques cannot model the nonlinear dynamics of the system, Inverted pendulum system is often used as a benchmark for verifying the performance and effectiveness of a new control method because of the simplicities of the structure. In this paper an accurate model of the inverted pendulum system, a neural network controller and ANFIS (Adaptive Neuro-Fuzzy Inference System) controller to stabilize the system have been developed. A control law that removes some of the nonlinearities from the process and allows the process to exhibit its dynamics has been developed. This aids in stabilizing the nonlinear pendulum. The quality of the data input has also been improved, since only limited number of variables that can be measured accurately are included in the system identification Simulation results establishes that the proposed controller has good set point tracking and disturbance rejection properties.