All praise is due to Allah, and may peace and blessings be upon the Messenger of Allah.
It is obligatory to believe in the Scale on the Day of Judgment and that the deeds of people will be weighed with perfect justice. Allah, the Exalted, says:
“And We shall set up the scales of justice on the Day of Resurrection, so that no soul will be treated unjustly in the slightest.” [Qur’an 21:47]
Scholars have explained that the reckoning and the weighing of deeds are among the events of the Day of Judgment. They have stated that the weighing takes place after the reckoning and before crossing the Sirat (the bridge over Hellfire), although no explicit text definitively establishes the detailed order of every stage.
According to what scholars have explained, people fall into three categories after their deeds are weighed:
First: Those whose good deeds outweigh their bad deeds.
These are among the people of happiness and success, and they will not enter Hellfire because of their sins. Allah, the Exalted, says:
“Then those whose scales are heavy—it is they who will be successful.” [Qur’an 23:102]
Second: Those whose bad deeds outweigh their good deeds.
If such a person is a Muslim who affirms the oneness of Allah, then his fate is subject to Allah’s will. He may enter Hellfire for a period proportionate to his sins and then be taken out of it and admitted to Paradise. As for a disbeliever, he will remain in Hellfire forever.
Third: Those whose good deeds and bad deeds are equal.
Scholars have identified these people as the inhabitants of Al-A‘raf (the Heights). They will remain for a period between Paradise and Hellfire, and their ultimate destination will then be Paradise, as Allah, the Exalted, says:
“And between them will be a barrier, and on the Heights will be men.” [Qur’an 7:46]
Therefore, whoever has more good deeds than bad deeds is among the people of success and will not be punished because of those sins; rather, he will enter Paradise.
As for a Muslim whose bad deeds outweigh his good deeds, it is not inevitable that he will enter Hellfire. His fate is subject to Allah’s will: Allah may forgive him, or He may punish him and then bring him out of Hellfire through His mercy.
And Allah Almighty knows best.