Slant correction is an indispensable technique for handwritten word recognition systems. Conventional slant correction techniques estimate the average slant angle of component characters and then correct the slant uniformly. Thus these conventional techniques will perform successfully under the assumption that each word is written with a constant slant. However, it is more widely acceptable assumption that the slant angle fluctuates during writing a word. In this paper, a nonuniform slant correction technique is presented where the slant correction problem is formulated as an optimal estimaiton problem of local slant angles at all horizontal positions. The optimal estimation is governed by a criterion function and several constraints for the global and local validity of the local angles. The optimal local slant angles which maximize the criterion satisfying the constraints are searched for efficiently by a dynamic programming based algrithm. Experimental results show the advantageous characteristics of the present technique over the uniform slant correction techniques.