Of course there would be numerous variables, such as W/V, aircraft climb rate and speed (climb angle), L/D ratio, aircraft maneuvering performance, surrounding terrain etc.
The most obvious parameter is the height at which the engine failure is presumed to occur. If you climbed straight ahead to 2000 ft and the engine stopped, you wouldn't ignore that big emergency landing site behind you in favour of a 150 m field that happens to be in front of the nose, would you. Similarly, if the engine stopped at 200 ft, I don't think many of us would contemplate a turnback. So the question to be asking is about the height at which landing again at the departure airport should be contemplated.