"Negligence" vs. "carelessness": close, but not the same

What is similar?
Both "negligence" and "carelessness" refer to a lack of proper attention or failure to take appropriate care, resulting in mistakes or accidents. They both describe behavior where someone does not fulfill a duty to be careful.
What is different?
"Negligence" is often used in formal, legal, or professional contexts to describe a failure to exercise the care that a reasonably prudent person would under similar circumstances, often resulting in harm or damage. "Carelessness" is a more general and informal term indicating not paying attention, without necessarily legal implications. Negligence implies a responsibility and consequences, while carelessness may simply refer to being sloppy or inattentive.
Which one is more common?

Examples of usage
Negligence- The doctor was sued for medical negligence after failing to diagnose the illness.
- The company’s negligence led to a serious safety violation.
- Due to his negligence, the house caught fire.
- His carelessness caused him to spill coffee on his laptop.
- She failed the test because of carelessness during the exam.
- Due to his carelessness, he forgot to lock the door.