Method for ascertaining an earth fault and the earth-fault direction in a three-phase network operated in a compensated way, characterized by the steps of: a) continuously measuring value pairs of a zero voltage and of a zero current with a given sample rate, wherein the value pairs are each attributed to a measurement time, and recording the determined value pairs and the attributed measurement time, b) continuously calculating the active energy by forming a product of the measured zero voltage and the measured zero current for each measurement time and forming a sum of a product which is attributed to the current measurement time and a number of preceding products, c) setting for the current measurement time a voltage flag to 1 if the attributed zero voltage is greater than a first threshold value and else to 0, and a current flag to 1 if the attributed zero current is greater than a second threshold value and else to 0, d) performing a Boolean AND-operation with the voltage flag and the current flag, for each current measurement time, wherein a result of the Boolean AND-operation is ON-delayed by a first time interval and release-delayed by a second time interval, wherein no earth fault is present in case of a result of 0 and an earth fault is present in case of a result of 1, and if an earth fault is present e) continuing to execute the steps a) to d) and verifying the algebraic sign of the active energy calculated up to the current measurement time, wherein a result of the verification is ON-delayed by a third time interval and release-delayed by a fourth time interval, and f) deciding at least on the basis of the algebraic sign of the active energy if the earth fault direction is reported as "forward", in case of a positive algebraic sign, or as "backward" in case of a negative algebraic sign. a) continuously measuring value pairs of a zero voltage and of a zero current with a given sample rate, wherein the value pairs are each attributed to a measurement time, and recording the determined value pairs and the attributed measurement time, b) continuously calculating the active energy by forming a product of the measured zero voltage and the measured zero current for each measurement time and forming a sum of a product which is attributed to the current measurement time and a number of preceding products, c) setting for the current measurement time a voltage flag to 1 if the attributed zero voltage is greater than a first threshold value and else to 0, and a current flag to 1 if the attributed zero current is greater than a second threshold value and else to 0, d) performing a Boolean AND-operation with the voltage flag and the current flag, for each current measurement time, wherein a result of the Boolean AND-operation is ON-delayed by a first time interval and release-delayed by a second time interval, wherein no earth fault is present in case of a result of 0 and an earth fault is present in case of a result of 1, and if an earth fault is present e) continuing to execute the steps a) to d) and verifying the algebraic sign of the active energy calculated up to the current measurement time, wherein a result of the verification is ON-delayed by a third time interval and release-delayed by a fourth time interval, and f) deciding at least on the basis of the algebraic sign of the active energy if the earth fault direction is reported as "forward", in case of a positive algebraic sign, or as "backward" in case of a negative algebraic sign.