There's no simple "cookbook" answer.
While the exact rules vary by state, in general, you are justified in employing lethal force only when a reasonable and prudent person, in like circumstances and knowing what you know, would conclude that lethal force is necessary to prevent otherwise unavoidable, imminent death or grave bodily injury to an innocent. To demonstrate that there was indeed a real danger from the assailant, one must show that the assailant had (1) the
Ability, i. e., the power to deliver force sufficient to cause death or grave bodily harm; (2) the
Opportunity, i. e., the assailant was capable of immediately deploying such force; and (3) put an innocent in
Jeopardy, i. e., the assailant was acting in such a manner that a reasonable and prudent person would conclude that he has the intent to kill or cripple. A person claiming self defense will need to be able to articulate why in the exact situation as it unfolded he concluded that lethal force was necessary based in the forgoing paradigm.
If someone has a knife, or a baseball bat or an axe (and maybe even a taser or pepper spray, since disabling you could be a prelude to more serious harm), you've established the person has
Ability, he has the power to kill or maim you. But you still have to satisfy the
Opportunity and
Jeopardy parts of the test.
Can the person effectively use the baseball bat to deliver a lethal blow? How close is he? Does he have the apparent physical capacity to wield it. An 80 year old guy on crutches with a baseball bat probably won't meet the
Opportunity part of the test.
And has the other person manifest the intention to use the particular implement to do you grave bodily harm? If he's running at you waving a knife and shouting that he's going to kill you, his conduct has satisfied the
Jeopardy part of the test. But if he pulls out a knife and a salamis, which he proceeds to whittle on for a snack, his conduct has not.
In some jurisdictions, there's also a
Preclusion prong to the test. Could you have done something else to prevent harm to yourself, other than using lethal force? If so, the
Preclusion part of the test has not been satisfied. Lethal force is a last resort. (Note, in some states, or in some circumstances, there is no duty to retreat.)
See
http://www.useofforce.us/.