Rita King, 81, who had dementia, died after being shot at De La Mer House, in Walton-on-the-Naze, Essex, in December.
Her husband, Ronald King, who has a mental health condition, admitted manslaughter on the grounds of diminished responsibility.
Judge Charles Gratwicke, at Chelmsford Crown Court, told him: "This was not a mercy killing."
He added: "This was without a doubt a carefully planned killing."
Killer told care home: 'I just killed the wife'
Follow updates on this story and other Essex news
The trial was told Mrs King's severe dementia had worsened in the months before her death and her husband had Alzheimer's and another mental health condition called paraphrenia which affected his ability to form judgements.
King, of Cedar Close, Walton-on-the-Naze, denied murder at an earlier hearing, but pleaded guilty to a lesser charge of manslaughter on the grounds of diminished responsibility.
During the trial, the jury heard King also considered shooting his older sister Eileen, who is a resident at the care home, as well as himself.
Mr King was sentenced to six years for manslaughter, five years for firearm possession and 12 months for possessing ammunition. All three terms will be served concurrently.
The judge ordered he be treated for his mental health condition at a secure hospital unit in Northampton.
Consultant psychiatrist James Warner said paraphrenia was an older person's version of schizophrenia in which people lose contact with reality.
An 87-year-old man who shot his wife dead at a care home has been sentenced to six years in prison.