The cost of the repair is high. It's very variable in relation the the price of the mechanic, the locality, the problems actually encountered and the local prices of things in general.
The engine is a significant part of the cost of the vehicle. Instead of rebuilding, consider buying a rebuilt long or short block (depending on your mechanics advice and the condition of the cylinder heads).
Also consider getting a guaranteed used motor. I'd choose the guatranteed used motor if cost is a big factor. I sure wouldn't rebuild it, a technician cabable of doing it right comes at a much higher price than a guy who could install an assembled motor.