Humans have been using rugs and carpets since ancient times, weaving camel hair or sheep wool into swaths to sit and sleep on in caves and tents, and turning colorful dyed silk into elaborate tapestries to cover cold castle floors. And, for just as long, people have fought epic wars against the dirty footprints, dusty splotches, and indeterminate gross stains that floor coverings attract.

While manufacturers continue to improve their products, churning out carpet and rugs that are more durable, are easier to vacuum, resist staining, and hide dirt, you’ll eventually need to have yours professionally cleaned. To help you find competent, reasonably priced companies for both in-home cleaning of wall-to-wall carpet and in-plant cleaning of rugs, we have we’ve collected from customers of local outfits and prices gathered by our undercover shoppers.

The company you hire will impact how well the job gets done, whether difficult stains are removed, how good your carpets and rugs look afterward, and how long they stay that way. With the least-competent companies you risk permanent damage from overwetting, improper or poorly mixed chemicals, bad brushing, and other shoddy practices.

Select a company that offers cleaning methods appropriate for your job. For lightly soiled carpet, any method performed properly is acceptable. But in most cases, you’re better off with an outfit that offers hot-water extraction with truck-mounted equipment. For rugs, check that the company has its own plant and does immersion cleaning.

Ask for a written guarantee that the company will redo the job if you aren’t happy. Discuss in advance whether it will or won’t guarantee to eliminate stains or other problems.

Compare prices. Most carpet and rug cleaners will quote prices for jobs via email or phone. Our ratings of local cleaning services include information to help you determine how each company stacks up on price.

For in-home carpet cleaning, watch out for prices quoted by room or “area” as opposed to by square foot. Companies may envision more rooms in your house than you do—two separate rooms in what you consider one L-shaped space, for example.

Don’t overpay for add-ons such as soil retardants and deodorizers. With some companies these dramatically increase the price; others include them for little or nothing. What they actually do, and how effective they are, also varies from company to company.

Results are also affected by how you deal with a company—including prepping rooms in advance for in-home cleaning, communicating exactly what you want done, pointing out stains and problems with past cleanings, checking the work carefully before paying, and promptly reporting to the company any problems you find.