The cost to replace carpet with hardwood varies. It depends on the kind of wood and installation costs. Carpet usually costs about to per square foot. Hardwood floors can range from to per square foot.