Abstract:Considering the limitations of available methods including the method on median and the Inter Quartile Range (IQR),etc. for detecting the abnormal TEC disturbance of ionosphere before earthquake, the paper put forword an improved method to distinguish the TEC anomaly by use of residual error after fitting the ionospheric TEC,i.e. At first,fitted the time sequence of ionospheric TEC and then distinguished the anomaly with sliding window method. On the basis of the GNSS observation data from the reference stations of Crustal Movement Observational Network of China, the continuous 31day TEC values over China were computed and the data of Wenchuan Ms8.0 earthquake in Sichuan province on May 12th 2008 were analyzed, the results shows that the ionospheric TEC anomaly obtained with the method is reasonable and effective.