The protagonist sets out on a journey to reach a goal. But the further he gets into the story, the clearer he understands that the odds aren't in his favor. He experiences loss, frustration, anger, fatigue. He falls, rises again, and falls once more. When he seems to be running out of option, thought, a stroke of luck™ appears.

Will this be accepted by the audience?

The idea here is that sometimes, chance is in our favor. Sometimes good things do happen, so, by extension, they should happen in our stories, too.

Of course I'm interested in avoiding the Deus Ex Machina, were the resolution to a problem is delivered by the sheer force of will of the author alone. DeMs come with a set of drawbacks - first and foremost being very unsatisfying for the audience.

One of the best advice in avoiding DeMs is giving a proper foreshadowing to the readers - eg. introduce the elements that will eventually solve the dire situation before that the situation gets solved.

While I totally agree, I don't feel this is always applicable. Sometimes we are talking about random chance - no way to foreshadow that - and some other times the solution is being prepared outside of the narrator PoV.

In my novel, the MC has gone through a series of losses and she's rapidly losing hope. Somehow, I think that this will make any change of fortune more acceptable by the readers. The lucky event will bring to a resolution, but it won't solve all her problems; it will just point her in the right direction.

To sum up:

Is it possible to use luck (real or perceived) without making a Deus ex Machina? Does it help having the lucky event happen after a series of unfavorable ones?

I'll leave here a very related question that focuses on DeMs in general.


  • 3
    Imho it completely depends on how big this stroke of luck is. Is this "luck" just in comparison with MC's previous experience, or this is something so big it will outshine all the previous bad luck?
    – Alexander
    Commented Mar 27, 2019 at 18:22
  • 1
    @Alexander It won't outshine previous events - grief will stay there, and dead close ones will stay dead. But it will give the MC a good kick towards the goal.
    – Liquid
    Commented Mar 27, 2019 at 18:31
  • 3
    I think this is an important distinction - the lucky event is just a "kick", or a solution in itself.
    – Alexander
    Commented Mar 27, 2019 at 18:37
  • 1
    If it worked for Tolkien...
    – Eth
    Commented Mar 28, 2019 at 14:40
  • @Eth Interesting. Eucatastrophes need their own discussion, I think
    – Liquid
    Commented Mar 28, 2019 at 15:00

10 Answers 10


Short answer: yes, with measure and forethought.

Note #1: unless karma and universal balance is a defining characteristic of your world, previous bad luck does not count. That's just how our world works.

Note #2: there are great examples of book that handle great moments of luck, and base their entire plot on it. I am guessing this is not the case in this question, and that the stroke of luck mentioned above is merely being considered as a lesser plot device.

First and foremost: keep luck reasonable.

Luck should serve merely as an input, or a very small step towards the MC goal. Be careful to not make it into the meaningful event that allows reaching the goal: while being great, luck has the unfortunate habit of removing the conflict with the world that you have built in your story. Too much of it and you throw a well crafted plot into a flat and dull series of pointless events.

For instance, if the MC is out of money, you could make them win the lottery with a ticket they find in the street, or you could get them to find a lost wallet with very little money in it. It is also true that luck can get greater as time passes, see the next section for this.

Second: make your MC deserve their luck.

This is also about conflict. If the MC does not try hard to get somewhere, then they probably do not deserve to get there. If it has to happen anyway, then see the next section. From a reader's perspective: what am I reading if they struggle to achieve X but they get Y instead, which is great, but not what I have been rooting for? You need to build expectation. The greater the expectation, the greater the relief when a bit of luck helps the MC. If your novel is a 800 pages book about a poor person trying to get through in any possible manner, then yes, it is acceptable to win the lottery out of sheer luck on page 790.

Third: Get more conflict out of each stroke of luck.

Usually luck removes conflict, removes struggles, and flattens an otherwise multifaceted plot. To avoid this you can add more conflicts and struggles for every lucky moment. Build them out of the envy of less fortunate characters. Make sure that the MC know that their luck is someone else's misfortune, and make them sorry for it. For instance, if you want to make them rich by winning the lottery, then make them alone.

  • 2
    Related: en.wikipedia.org/wiki/Gambler%27s_fallacy. Probability is not self-correcting. A string of low dice rolls does not mean that higher rolls are more likely, or "due", to "balance things out". If anything, it might mean the dice are actually biased to roll low, but even assuming fair dice or a fair coin toss it's a fallacy. "Luck" in real life can be more complicated, because most events aren't nearly as simple as a 50/50 coin toss. Seeing something as "lucky" can even depend on perspective. Commented Mar 28, 2019 at 19:50

I really like the answer @NofP gave.

I can add one more condition that would make it acceptable to the reader:

Fourth: The character did something in the past that directly made the luck possible or probable.

Maybe the character helped someone early in the story who is responsible for the "stroke of luck." The important thing is that the MC didn't help the person expecting something in return. They helped that person because they thought it to be the right thing to do. Also, instead of a direct result, it is possible that the character did something that started a chain of events that, eventually, resulted in the character's "lucky break."

  • 1
    This and @Amadeus’ answer both tie into a common real-world saying: You make your own luck. Many things in life are truly random and beyond your direct control — but still, you can affect the odds of good things happening (e.g. by doing other people favours), and you can be more or less ready to take advantage of lucky opportunities when they come.
    – PLL
    Commented Mar 28, 2019 at 15:12
  • @PLL, Yep. Oddly enough, i just read an article about Elon Musk where he sees all choices as increasing or decreasing the chance of things to happen.
    – ShadoCat
    Commented Mar 28, 2019 at 17:42

I'd rather make the luck indirect, I think it works out better that way. So if my character is hungry, the lucky thing is they find a piece of discarded stiff wire, but THEN they sharpen the wire on a stone, and bend it into a fish hook, and make a lure from a feather, and use the thread from their shirt as line to go fishing -- and they catch dinner. The discarded wire is a deus ex machina, for sure. Heck, the lake with a fish in it is a deus ex machina too! But it feels like the character was clever and diligent and turned a worthless piece of wire into a tool.

So I let them get lucky, but the luck still takes them some work and ingenuity, so it feels like they earned whatever boon they get out of it. And it shows my character is resourceful and doesn't give up.

  • 1
    This and @ShadoCat’s answer both tie into a common real-world saying: You make your own luck. Many things in life are truly random and beyond your direct control — but still, you can affect the odds of good things happening (e.g. by doing other people favours), and you can be more or less ready to take advantage of lucky opportunities when they come.
    – PLL
    Commented Mar 28, 2019 at 15:12
  • 1
    I agree with @PLL, this is a nice way to give your character a lucky break without it coming across as shallow.
    – sezmeralda
    Commented Mar 28, 2019 at 22:42
  • The breathable air is a deus ex machina too! X3 The existence of fish and trash is not divine intervention. This is more closely using your ingenuity to solve a problem with the available resources. In your example, the character didn't specifically need a fish hook or wire, they were just things that worked that the character could reasonably find with a quick look around. The "good luck" here is more acceptable because it didn't require much luck, just cunning/flexibility of the MC. Or to put in simpler words, this is more about distancing the luck from the actual solution.
    – Tezra
    Commented Mar 29, 2019 at 14:23
  • @Tezra I don't know; to me walking a dirt road and coming across a piece of wire, even two inches long, suitable for fashioning into a fish hook, seems pretty lucky. But I will agree with you, the point is definitely to distance the luck from the solution; and require the char to be observant, inventive, insightful, intelligent, patient or some other "good" trait in order to exploit the lucky break.
    – Amadeus
    Commented Mar 29, 2019 at 15:31
  • 1
    @Amadeus I meant the luckieness is more a formula of %Chance-of-something-suitable than %Chance-of-this-specific-thing. So the broader the net you make that "something suitable", the easier it is to accept. (So the availability of alternative possible routes to the MC helps dilute the implausibility of a "lucky break".) Like the difference between having to get 100$ from a lotto vs getting 100$ by any means.
    – Tezra
    Commented Mar 29, 2019 at 17:09

So, when I was in college learning to code and was stuck on a bug that I could not fix, and was spending hours looking at it without any solution, the best course of action was for me to take a break (though in my frustration, it was more like give up). As I was leaving the computer lab on my way back to my dorm, then solution would hit me... more often than not before I hit the exit for the building the lab was in.

Sometimes when you get so focused on the end, you get tunnel vision to the goal and can't see the bridge over the gap to that path. Perhaps after the last and most recent screw up, she hits a low and believes she's failed and will never win... and she's running over her failure over and over and over, and all the things that she could have done and that's when the solution hits her and it's never been more obvious. Its decidedly lucky, but the trick is that the answer was something she missed.

For me, it's a language issue... the specific wording used entails the solution. My go to example is, suppose that your friend got a really bad haircut. It's so bad, you think it's a nightmare... but then your friend asks you what you think of the haircut. "It's a dream," I respond.

Am I a liar? I resent that I even have to pretend you would think that of me. I told the friend the truth. Nightmares are dreams, are they not? If the friend draws the conclusion that I liked the haircut, that's their own fault, not mine.

Maybe the villain said something that seems subtle at first, but the difference between the assumed meaning and the actual meaning is actually a lot... you've been fighting a battle chained by the rules of the assumed meaning... maybe the villain has been fighting the fight with the assumed rules as well... and with the knowledge that the actual meaning does not contain rules that benefit him, but hurts you... and if you know it and he doesn't that could turn the tide.

Consider the ending of Frozen. Anna is told that only an act of true love could break the curse on her, and seeks Kristoff to kiss, which she believes is the way to break the spell... But when she sees that her choice is between saving her sister's life or saving her own (by breaking the curse) she chooses to protect her sister and succumbs to the curse... and then curse is broken.

Anna was operating on the idea of the protypical Disney use of the trope of true love breaking the curse: A kiss from the true romantic partner will break this spell... However, the rule is "TRUE LOVE" not "true ROMANTIC love" and it's possible to love someone aromantically... such as love of sacrificing your life for your sister... which as far as the curse is concerned is an act of true love. Anna was operating under a set of rules that did not apply because she didn't pay attention to the exact wording of the rules.

  • A nice answer over all, and I do like your point on the assumed meaning. I think this would work better with proper Deus Ex Machinas rather than "luck", but I'll think about it.
    – Liquid
    Commented Mar 27, 2019 at 21:45
  • 1
    @Liquid: This isn't a Deus Ex Machina, as it was properly foreshadowed, As long as you are consistent with the physics of your rules, the characters lack of understanding can be forgiven. Another Disney Example, "The Princess and the Frog" features the rule that prince can break the curse of being a Frog if he kisses a Princess. Can he kiss any pretty woman? Nope, must be princess, the pretty girl now shares the curse. Can the princess be the daughter of the parade's master of ceremonies, who is dubbed the King of Mardi Gras? Yes, she's a princess, but only on Mardi Gras.+
    – hszmv
    Commented Mar 28, 2019 at 13:14
  • + What if I married the pretty woman that I accidentally turned into a frog by kissing her when she wasn't a princess and then I kiss her? Sure, ain't no rule says the princess has to be a human princess! The film's rules are simple and offer a very flexible interpretation allowing for creative compliance... this is all hinted at well before we see why they work or do not work or work for reasons the characters and audience didn't consider. Deus ex Machina of this would be that the people who explained the rule suddenly found a new rule that saves the day just to get to the end.
    – hszmv
    Commented Mar 28, 2019 at 13:20

As a comment has stated, luck cannot have a direct implication towards the solution itself. Otherwise at best it'll be a Deus Ex Machina event, and at worst it will bore the reader.

With that in mind, I find Luck may more interestingly manifest itself in cases such as where:

  • The MC would have to sacrifice something serious/painful (but still disposable) to accomplish a goal, but didn't have to because of luck. This could even give readers a sigh of relief specially since they are used to the MC getting screwed.

    A loophole to this would be having a later problem that can be solved because the MC was spared this otherwise affordable cost before. You can play around with this in many ways.

  • The MC comes across a token (that has meaning to them) which sparks their emotional strength, and with that strength they fulfill their goals. This has less to do with the solution but instead resolution to follow through with their objective.

  • (My favorite) The MC gets to see that because of misfortune the MC has endured, they have in fact been spared from worse luck - had things gone "according to plan" earlier, the MC would be in a truly awful situation. Maybe hardships taught them many things that allows them to thrive, maybe destroyed relationships kept them from following a dark path; We'll never know what worse luck our bad luck has saved we from, but the MC may.

While these are all things that don't necessarily change the story, I find that they are enriched experiences because of instances of Luck and can be used to refuel some of the fire for the reader's interest.

  • "Enriched experiences" I couldn't agree more. For me it that's a key differentiator between a DExM & and an engaging plot.
    – sezmeralda
    Commented Mar 29, 2019 at 1:58

Generic Rules of Thumb

1 Proportionality

No positive act of luck should exceed in value the greatest change allowed by a single negative instance of luck that took things away. That is, if your character loses $500 in small increments of $10 or $20, they should not have a lucky event that awards them $500 all at once with no strings attached.

2 Reasonableness

A reader should not be shocked by the idea that the lucky event has happened. If it literally comes out of left field, its likely too random for a reader. Dues Ex Machina worked in the past because people assumed Gods fixed things. It's not unreasonable for a God to fix things if you believe Gods fix things. It just may not be as satisfying as the individual fixing things themselves. So, if luck features in your story then the "positive" luck things should be as reasonable as the "negative" luck things that happen. Which means they'd be reasonable happening to anyone in the same situation.

3 Deservedness

Contrary to popular belief bad things happen to good and bad people; but in stories they only happen to people who need to learn something. Good things shouldn't start happening until the character starts learning his lessons. If each good thing that happens at random follows some act that makes us think the character deserves something positive then it might very well be luck, but it will feel deserved and thereby accepted.

It is possible that high marks in any one of the above fields might make high marks in all of them unnecessary. If you've established that a character is rich, does not care very much for his money, and likes your main character; then perhaps after they get to know each other over a drink and your mc becomes likable; your mc might "fall" into a business opportunity or be given a substantial monetary gift. That amount of luck might not be proportional, but if it feels authentic (reasonable) and deserved that's enough. If it doesn't feel authentic and reasonable then it probably needs to have a smaller impact on the story.


The modern movie "My Neighbor Totoro" is a Deus Ex Machina film, but it spends the first half of the movie establishing a spiritual background where forces from the beyond might actually be able to step in and save the day. The first half of the film is full of the children coming to grips with this spiritual realm and working for respect. If the film hadn't done this, the film likely would have ended with a 4-year-old dead in a pond or on the side of a road -or- worse, a unsatisfying "lucky" ending.


As well as the great answers already given, I'd add that life, unlike a video game, does not have a kind of win state. A stroke of good luck is rarely a "win button". Often luck comes in the form of an opportunity, but to make the most of your stroke of luck you have to make the most of that opportunity, and that can take hard work.

So I suggest not making that stroke of luck the "end" but something that finally gives the MC the means to achieve what they want, but with hard work still required. This gives them hurdles to overcome but the audience can root for the MC to overcome them to get some kind of tangible reward. Others have mentioned deservedness, and showing that your MC is willing to work hard to make use of their good fortune can also be a good way of displaying this.


When you're worried about a stroke of luck behaving like Deus Ex Machina, it is reasonable to think of that stroke of luck as something magical. Because of that, I believe invoking Sanderson's First Law of Magic is appropriate:

An author’s ability to solve conflict with magic is DIRECTLY PROPORTIONAL to how well the reader understands said magic.

In the linked article he goes into more details about the word choices. For example, "to solve conflict" is important. As it turns out, you can use as much magic as you want to create conflict, but the reader better have understanding before you resolve conflict with magic. This opens all sorts of doors. For example, your stroke of luck can convert one conflict to another, minimizing that feeling of "resolving conflict." This leads to stories where one has a burst of luck, but the characters don't realize it was fortuitous until later.

A few answers mentioned things like karma. Karma works in stories because most readers have an intuition about how karma functions. As long as you play to that, it works.

Mystery novels often rely on giving the reader almost all of the pieces, before providing the last piece and letting it all unwind.

So there's many solutions, but I find invoking Sanderson's First Law is an effective test as to which solutions will be accepted and which will not.


There are a lot of good answers here. I have one more point to add.

Sometimes a run of bad luck seems rather extreme and the reader might be thinking that is the only kind of luck this poor soul has. If timed correctly, the reader will be primed for a change of fortune.

As others have mentioned, it ought not seem extreme nor should it be completely unlooked for. Improbable things happen, but much less often. If the change of luck is moderate it will be avoid the appearance of Deus ex Machina.


Odds are relatively low someone would experience both phenomenally good and bad luck.

But even if you paint yourself into this corner, consider this:

If you want your story to seem believable when something seemingly remote happens, Seinfeld tv sitcom show was pretty good at setting up a surprise ending while dropping hints on the rise to the climax or even throughout the episode. I think that makes a surprise ending is a little bit more palatable by making the reader who can be too busy being shocked that they were given the answer and they didn't recognize it to really question other aspects of the story they would have otherwise found problematic.

Good luck and happy writing..

  • 1
    "For example on average the odds of losing a perfect binary should be about 1% after five rounds of lost consecutively." This isn't true. If you have lost 5 rounds (or any number of rounds), the probability of losing the next fair coin toss is still 50/50, since the coin doesn't remember what it's landed on. It's the probability of losing six fair coin tosses out of six that is incredibly unlikely.
    – Laurel
    Commented Mar 28, 2019 at 18:50
  • I stand corrected here is my math: 1/ 50%, 2 25%, 3 12.5%, 4 6.25%, 5 3.125%, 6 1.5625%. Please let me know if you disagree. Commented Mar 28, 2019 at 19:01
  • 1
    What I'm trying to say is P(A|B) ≠ P(A and B), where A is losing one fair coin flip and B is losing 5. Because P(A|B) = P(A) = .5 in this case. In other words, look at the Gambler's Fallacy.
    – Laurel
    Commented Mar 28, 2019 at 19:10
  • I'll concede here. Offending remarks striken. Commented Mar 28, 2019 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.