The cost varies wildly depending on the length of the pipe, the depth required for excavation, and whether the pipe runs under expensive hardscaping like concrete driveways or patios. A spot repair might cost $1,500 - $3,000, while a full mainline replacement can range from $5,000 to over $15,000.
This is exactly why we insist on a Camera Inspection first. Many homeowners are quoted for full replacements when a high-pressure hydro-jetting service or a targeted spot-repair would have permanently solved the issue for a fraction of the cost.