A precise and fast computational method for the simulation and analysis of moiré patterns is proposed. This new algorithm is based on convolution with superposition of the intensity profile which is transmitted from the optical layers and the point spread function. The computational time is shown to be much faster than that of the ray-tracing algorithm because the new algorithm does not involve a massive calculation. Also, information on the moiré pitch can be extracted directly from the sampling data of the moiré patterns.