First, the vet
A sudden change in litter-box use should be treated as a possible medical problem first. Urinary tract disease, bladder inflammation, kidney disease, diabetes, arthritis, constipation, and other painful conditions can make urination uncomfortable or make the box difficult to reach. A cat may then associate the box with pain or simply fail to get there in time.
Seek urgent veterinary care if your cat repeatedly strains, produces little or no urine, cries while trying to urinate, vomits, hides, or seems lethargic. A urinary obstruction is an emergency, particularly in male cats.
Elimination or urine marking?
The pattern offers clues. A cat eliminating outside the box typically squats and leaves a larger amount on a horizontal surface. A marking cat often stands, raises a quivering tail, and deposits a smaller amount on a vertical surface. These patterns are useful, but not perfect; a veterinarian or behavior professional should consider the whole picture.
It is important to confirm if the behavior is elimination or urine marking as the solution to the problem is different.
Look at the litter box experience
Cats may avoid boxes that are dirty, small, covered, difficult to enter, filled with an unpleasant litter, or located near noisy appliances. In multi-cat homes, a cat may also be blocked or ambushed near the box. Feline veterinary guidelines recommend multiple boxes in separate locations rather than several boxes lined up together. A common starting point is one box per cat plus one extra, although placement and individual preference matter as much as the number.
Choose large boxes with easy access and offer unscented, fine-grained litter. Scoop at least daily. Place boxes in quiet locations with more than one escape route when possible. Senior or mobility-impaired cats may need a low entry.
Clean and observe
Use an enzymatic urine cleaner; ammonia-based cleaners can smell urine-like to cats. Do not punish, yell, or carry the cat to the box. Punishment can increase fear without addressing the reason for the behavior.
Keep a simple log of where and when accidents happen, urine volume, household events, and which boxes are used. That pattern can help your veterinarian and behavior consultant distinguish a medical issue, litter preference, location problem, marking, or social tension.

