A novel algorithm to detect the skew angle of a scanned track image is proposed. The proposed algorithm is based on wavelet transform and linear least square fitting method. First, a skew feature image of the original track image, which preserves the track's horizontal feature, is extracted by the wavelet transform. Given a threshold, the skew feature image is then transformed a binary image, in which most of the object points correspond to the top or bottom ends of tracks. Those object points are fitted by using linear least square method to get a line for each top or bottom end row of tracks. The average value of the skew angle of the several lines is regarded as the skew angles of the track images. Experimental results show that this algorithm performs well on track images. The effects of various wavelet basis are investigated too.