In this paper, a particle swarm optimization method with a new strategy for inertia weight has been considered. The author abandoned the commonly used linear inertia weight and proposed a new dynamic inertia weight based on fitness of the particles. The new weight is a function of the best and the worst fitness of the particles. The considered NIWPSO algorithm was tested on a set of benchmark functions and the results were compared with those obtained through the standard PSO with linear decreasing inertia weight (LDW-PSO), PSO with a random number inertia weight (RNW-PSO) and the PSO algorithm with exponential inertia weight to show that NIWPSO is faster and more effective than the others.