There is a particular kind of thought that tends to appear when we are dissatisfied with where we are. So we go back; to the decision that we made, the conversation we had, the degree we chose, the job we turned down, the person we decided to leave. And then we begin imagining what things might have looked like if one small part of the story had been different.
What if...I had chosen differently? What if...I had done this instead? What if...I had known then what I know now? Would things have been any better?
Sometimes these thoughts can simply be a form of reflection. We look back and recognise that we could have handled the situation better, then carry that lesson forward. But other times, we keep returning to the same moment without actually being able to change anything about it.
This is where psychology can give us an interesting way of understanding what the mind is doing.
The mind and the alternative past
Psychologists refer to this as counterfactual thinking: "the cognitive process of mentally simulating alternatives to events that have already occurred" (Soares et al., 2026) and considering how things might have turned out differently. It is a normal part of human thinking as people use counterfactuals to understand what happened, identify possible causes, learn from experience and guide their future decisions.
For example, someone who performs poorly on an exam might think: "Well if I had started studying earlier, I would have done better." That thought is not necessarily a problem as it might help them change how they prepare next time. The difficulty comes when the thought no longer leads anywhere. Only if I had started earlier...If I had chosen that university...If I had taken that opportunity first...If I had stayed...(see the direction the thoughts are moving in?). The mind can keep generating alternatives, especially when we remain focused on what might have been rather than what can still be changed; and with regards to these alternatives, we have to remember one thing: we imagine them with information we have now, while leaving out everything we do not know.
We know what actually happened. We do not know what would have happened.
That distinction is easy to lose when regret is involved because regret naturally involves comparing what happened with an imagined outcome that seems better. The alternative life can start looking very convincing precisely because we never had to live it. We don't know what difficulties might have come with it, which doors might have closed instead, we don't know which people we would have met, what circumstances we would have encountered, or whether the outcome would actually have been what we imagine it to be. We only know that it did not happen. And this is where the knowledge of Qadr (divine decree) becomes important for us to understand.
A question about Qadr
There is a narration about Ibn al-Daylami that I keep returning to when thinking about this. He said that something concerning Qadr has entered his heart and he feared that it would affect his religion and his affairs. So he went to Ubayy ibn Ka'b (RA) and asked him to tell him something through which Allah might benefit him. Ubayy (RA) answered him and told him to go to Abdullah ibn Mas'ud (RA). Ibn Mas'ud gave him a similar answer and directed him to Hudhayfah (RA), who did the same and directed him to Zayd ibn Thabit (RA).
Ibn al-Daylami then came to Zayd (RA), who narrated from the Messenger of Allah ﷺ:
"If Allah were to punish the inhabitants of His heavens and of His earth, he would do so and He would not be unjust towards them. And if He were to have mercy on them, His mercy would be better for them than their own deeds. If you had the equivalent of Mount Uhud which you spent in the cause of Allah, that would not be accepted from you until you believed in the Divine Decree and you know that whatever has befallen you, could not have passed you by; and whatever has passed you by, could not have befallen you; and that if you were to die believing anything other than this, you would enter Hell"
[Sunan Ibn Majah 77, graded Sahih]
The narration is much bigger than the particular question of regret, but the final part is especially relevant: Whatever has befallen you, could not have passed you by; and whatever has passed you by, could not have befallen you. This is not to say that our decisions are meaningless; rather, it tells us about the limits of what we can do with the past. If something has happened to you, you cannot now make it something that did not happen. And if something did not happen to you, repeatedly replaying the circumstances cannot make it part of your decree.
Well that sounds simple, but it is actually quite difficult to live by. Because the mind does not always stop at the mistake but it moves towards imagining how life would be completely different if that mistake hadn't been made, and then further imagining how happier one would be if life had been different. And then we are no longer learning from what happened but we are building an entire alternative life around an event that never took place.
Islam does not tell us not to learn from our mistakes
Belief in Qadr is not an excuse for carelessness, and it does not mean that we stop examining our decisions. Abu Hurayrah (RA) reported the Prophet ﷺ as saying:
A strong believer is better and is more lovable to Allah than a weak believer, and there is good in everyone, (but) cherish that which gives you benefit (in the Hereafter) and seek help from Allah and do not lose heart, and if anything (in the form of trouble) comes to you, don't say: If I had not done that, it would not have happened so and so, but say: Allah did that what He had ordained to do and your" if" opens the (gate) for the Satan.
[Sahih Muslim 2664]
Notice how the hadith begins with action...Cherish that which benefits you. Seek help from Allah. Do not lose heart. Then, after something has happened, the Prophet ﷺ teaches us how to speak about it.
This is important because there are two very different things we can do with the past. We can ask where we did wrong and what we should do differently next time OR we can mentally keep returning to the past event until we can construct the version of our life we wish had happened. The first can lead to correction but the second has no obvious endpoint.
If we made a poor decision, we can admit it. If we harmed someone, we can seek forgiveness and make amends. If we chose badly, we can learn what we should look for next time. But none of that requires us to keep imagining the life that would have existed if we had never made the mistake. There is a difference between taking a lesson from the past and trying to live inside an alternative version of it.
We do not know what the other path contained
This becomes relevant when we talk about education and careers (especially now in the field of Islamic Psychology). There is a particular kind of advice that has become common online, with catchy hooks like:
If I were starting my degree again, this is what I would do instead.
If I knew what I know now, I would have chosen this career.
If you're interested in Islamic Psychology, this is the path you should take.
There can be real benefit in hearing from people who have already walked a particular path as their experience can save someone time and unnecessary difficulty. But experience is not the same thing as a universal roadmap. People enter Islamic psychology from very different places: someone might begin with Western psychology, someone else might come from Islamic studies, someone might study Islamic psychology from the beginning, another person might arrive from completely different fields like medicine, business, accountancy or another field entirely.
Their circumstances are different too. Their financial situation may be different, their responsibilities may be different, their access to education may be different, the opportunities available to them may be different. So advice that was completely appropriate for one person may not be appropriate for another.
That is why we should seek advice from people who actually understand the field, look into the requirements of the path we are considering, then make decisions based on our own circumstances rather than trying to reproduce someone else's timeline. But even after doing all of that, we have to remember something: A plan is still a plan. We can plan our education five years ahead, decide which qualifications we want to pursue, we can map out the steps we think will take us towards a particular career. But we do not know what will happen five years from now. Allah does. This is not a reason to stop planning but it is a reason not to become attached to the plan as though we know how our lives are supposed to unfold.
You might begin with one degree and end up somewhere you never even anticipated. You might think something is a detour and later find that it had benefits you could not have anticipated. You might work towards something for years and then find that Allah opens another door entirely. We do not know and we do not need to know in advance.
But what about the regret?
It would be too simplistic to say that believing in Qadr means we should not feel sad or regret over what has already happened. Regret is a real human emotion and reflecting on our own choices can sometimes be useful. The point is not to eliminate every uncomfortable thought about the past but to notice what we are doing with it. Is this thought helping me identify something I need to correct? Or am I repeatedly returning to an event in the hope that I can somehow arrive at a different outcome?
Psychological research on counterfactual thinking supports this distinction. Counterfactuals can serve useful functions, particularly when they help people identify what could be changed and prepare for future behaviour. But when regret becomes repetitive, it has also been associated with greater psychological distress (Roese et al., 2009).
So perhaps the better question is: what am I doing with this thought? If the answer is learning, then take the lesson. If the answer is planning, then use it to make a better decision next time. If the answer is repenting, then repent. If the answer is making amends, then make amends. But if the answer is simply replaying something that cannot be changed, then we may need to recognise that we are no longer learning from the past.
Qadr does not require us to know the wisdom
There is another part of this that I think is easy to miss. Sometimes, after something happens, we desperately want to understand the why. Why did Allah let this happen? Why did that opportunity disappear? Why did this path close? Why did I end up here instead of there? We may eventually understand some of these things with time. Sometimes we don't. And we should be careful about speaking with certainty about the specific wisdom behind Allah's decree when Allah has not told us what that wisdom is. We know that Allah is Al-Hakim, the Most-Wise. We know that nothing occurs outside of His knowledge and decree. We know that He does not wrong anyone and that He is the Most-Just.
As Allah says in the Quran (2:216):
"Perhaps you hate a thing and it is good for you, and perhaps you love a thing and it is bad for you. Allah knows, and you do not know."
Allah knows, and you do not know. Isn't that reassuring and comforting? There are things about our lives that we simply do not have access to, and believing in Qadr means accepting that limitation. There are so many lives we can imagine: the degree we could have taken, the city we could have moved to, the opportunity we could have accepted, the decision we could have made, the person we could have become...but we do not know those lives. We know this one. And within this life, we are still commanded to act. We can seek what benefits us, we can ask Allah for help, we can take the means, we can seek advice, we can make istikhara, we can change direction when we realise that we have made a mistake. Then, when something happens that is outside our ability to undo, we accept that it has occurred by Allah's decree.
Allah decreed, and whatever He willed, He did. Whatever has befallen you could not have passed you by, and whatever has passed you by could not have befallen you.
References:
Roese, N. J., Epstude, K., Fessel, F., Morrison, M., Smallman, R., Summerville, A., Galinsky, A. D., & Segerstrom, S. (2009). Repetitive Regret, Depression, and Anxiety: Findings from a Nationally Representative Survey. Journal of Social and Clinical Psychology, 28(6), 671–688. https://doi.org/10.1521/jscp.2009.28.6.671
Soares, L., Melim, B., Nunes, H., & Costa, J. (2026). Counterfactual Thinking in Psychology: From Cognitive Mechanisms to Clinical Practice. Biomedical Journal of Scientific & Technical Research, 66(1), 58362.