An optimal curve fitting technique has been developed which is meant to automatically provide a fit to any ordered digital data in plane. A more flexible class of rational cubic functions is the basis of this technique. This class of functions involves two control parameters, which help to produce optimal curve fit. The curve technique has used various ideas for curve design. These ideas include end-point interpolation, intermediate point interpolation, detection of characteristic points, and parameterization. The final shape is achieved by stitching the generalized Bézier cubic pieces with an ideally acceptable smoothness. Keywords Data, Curve fitting, Characteristic points, Interpolation, Spline.