Installing hardwood flooring can cost between $7 and $15 per square foot, compared with about $2.50 to $5 per square foot for carpet—so some homeowners opt to install hardwood only in some rooms rather than throughout their home. However, carpet typically needs to be replaced if it becomes stained or worn out. Good quality carpet can last about 10 to 15 years, while hardwood can last forever. The return on investment for installing hardwood varies, but hardwood flooring can often help your home sell faster. While many buyers and homeowners prefer hardwood flooring throughout their home, some people prefer carpet in the bedrooms because they like a softer surface. Especially when you live in a two or three-story home, carpet helps reduce the noise from walking around.