Doctors need training on how to tell patients they are dying rather than having to learn "on the job", according to a new report.
Medics find it difficult to tell patients they are dying and also to predict how long somebody will live, with some "thrown in at the deep end", the study of doctors' and patients' views found.
Published by the British Medical Association (BMA), the report into end-of-life care said: "Without exception, doctors did not find it easy to discuss dying and death with their patients."
Of 237 doctors who were interviewed in depth, most said the talk was "always distressing" but could be rewarding and a privilege.
The report added: "Very few doctors said they had had any training in discussing sensitive issues with patients and that the usual way of learning was to observe and then learn on the job, with confidence growing over time.
"For some doctors these types of discussions were said to be a cause of major anxiety and one where training was called for."
One doctor told researchers they had found it "very difficult" to talk to dying patients before they worked in a hospice.
They said this was because "one, as a junior doctor, we're not taught very much, and two, those kinds of complex conversations we leave to the senior consultants because they have more experience".
Some medics said not all doctors had the confidence to discuss death and not all "had the innate skills to manage such conversations".
One GP said: "Some consultants won't tell the patient (he or she is terminally ill), partly because they're afraid what the patient's reaction will be."
Medical students said they had little training in this area and had to learn by watching more experienced doctors or by "being thrown in the deep end".
One doctor said: "We should say, 'You are coming to the end your life'. I think that is where we are failing patients. We are not preparing them. We are not even mentioning the word ... So it all comes as a huge surprise ... We should be far more frank."
Doctors also said that when given a terminal diagnosis patients "virtually always" ask how long they have left to live.
But they said it was almost impossible to accurately predict life expectancy after a terminal diagnosis unless death is "a few hours, or at most, a few days away".
One doctor said: "I generally talk in terms of days, weeks, months. Months are more difficult. Towards the end it becomes easier because patients are not eating, they're not drinking, not walking ..."
Even so, doctors felt that even guessing how long somebody had left could potentially undermine the trust that patients have in their doctors.
One said: "There's such a danger in giving an exact answer isn't there 'cos then you're beholden to it."
The report also included the views of 269 members of the public.
It found most wanted to die quickly in their sleep while those who were parents worried about who would look after their children or becoming a burden.
Both doctors and patients pointed to variation in the quality of care across the country, as well as between institutions, such as hospitals and hospices.
Doctors felt that patients with a terminal diagnosis such as cancer had better care than those who were elderly or frail, or who did not have a specific diagnosis.
Asked about doctor-assisted dying, medics raised concerns about the impact on the patient-doctor relationship, as well as people developing a fear of doctors or hospitals.
But for the public and some doctors, doctor-assisted dying could mean doctors were more able to provide a "good" death.
Overall, talking about death and dying was seen as "taboo" and not part of "British culture".
Dr Ian Wilson, from the BMA, called for an end to the "postcode lottery" for people at the end of their lives.
He added: "Doctors need the time, support and sufficient training necessary for caring for people at their end of life, and patients must be able to access a high quality of end-of-life care wherever they live, whatever their medical condition.
Claire Henry, chief of the National Council for Palliative Care, said it supported the BMA's call for the Government to prioritise end-of-life care.
She said: "End-of-life care has improved in recent years, but much more needs to be done. At the Government's request, I chaired a wide-ranging review into end-of-life care that identified a number of urgent areas for further improvement.
"I know the Government received and appreciated the review, but we are still waiting for a detailed response after almost a year.
"At the moment, too many people do not receive good quality end-of-life care, and the system is disjointed and inefficient."
Adrienne Betteley from Macmillan Cancer Support said: "People should feel in control and as comfortable as possible at the end of life.
"Clear, timely and sensitive communication is such as fundamental part of someone having a good end of life experience, and yet we know there is still a distinct lack of training for doctors in this area.
"This has to be fixed as an absolute priority."