1. A method of correcting overlay error, comprising: detecting an overlay mark on a substrate to generate an overlay mark information, wherein the overlay mark comprises: at least a pair of first mark patterns disposed in a first layer on the substrate, wherein the first mark patterns are periodic structures; and at least a second mark pattern disposed in a second layer different from the first layer, wherein the second mark pattern is periodic structure and the second layer is on the substrate; calculating the overlay mark information to generate an offset value between the first mark patterns; calculating the overlay mark information to generate a deviation value between the second mark pattern and at least one of the first mark patterns, wherein the deviation value has a deviation direction; and using the offset value to compensate the deviation value so as to generate a corrected deviation value, wherein the offset value has an offset direction parallel to the offset direction.