In this paper, a quantitative method to analyze the effective range of fogging effect from massive data is presented. According to the calculated effective range, we use two approaches to correct the pattern-dependent CD error that come from e-beam writing. One is the fogging effect correction(FEC), which uses a Gaussian distributed model to describe FE. Second, we implement dosage modulation based on the assumption that the error caused by FE is linearly proportional to the pattern density of a mask. In summary, we are able to successfully predict the map of CD error for various layouts, and correct the error caused by FE in mask-making.