There is a
famous and very detailed analysis of this topic on the web.
A turnback requires certain conditions to be met, and they are best met if
- you identify the engine failure quickly
- you have a long runway
- you have a strong headwind (well, you won't be taking off with a tailwind
)
- you do a very sharp turn back (as much G as possible without stalling)
- you turn
into wind
To a large degree, the decision whether to turn back, should the engine fail, can be made during the pre takeoff briefing, which a pilot should do even if flying on his own.
"In the event of a total loss of power, below 1000 feet, we will turn back, to the right, 60 degree bank angle".
On most commercial-sized runways (say 1500m+) it should be easy. But of course it depends when the engine fails. If it fails "too late" then you won't make it back to the runway no matter what