He is healthy, no medical conditions vet could find. First I tried putting foil down where he was pooping. He just moved to pooping in another spot, but close to the original area. Then I tried moving his litter box to where he was pooping on the carpet, but again, he just chose another spot, but still close. Then I tried a new litter box, slightly larger. He used it for a week then returned to pooping on the carpet. Now I gave him a rubbermaid container (because he is a large cat) but left out his previous litterbox as well, in case he wanted to urinate in one and poop in the other. No dice. He is still pooping on the carpet. This game has been going on for a month and I'm losing it. This behavior began when we painted the room but the paint is long since dry, and placing an additional litterbox in another room didn't work either. I don't understand because he will poop on the carpet right below his favorite window ledge and then sit on the ledge all day.