I read that a litter box for each cat + 1 is the best way, and some cats are super picky about the box. Have you moved the box latley? Cats don't like when you move the box, or use a different brand of litter other than the usual. All of these things can encourage them to pee/poop outside of the litter box.
My cats always pee on the floor outside the box or on the outside of the box itself if I don't scoop the boxes several times a day. Through trial and error, I added in more boxes, scooped alot more, and kept the same litter everytime and they have been really good about going in the box now. Plus getting them neutered helped tremendously!
I have 2 cats and 3 boxes, that REALLY helped me alot. I hope you can figure it out and fix it, because I know how frustrating it can get. Good luck!