When does a baby get its soul?
وَوَصَّيْنَا الْإِنسَانَ بِوَالِدَيْهِ حَمَلَتْهُ أُمُّهُ وَهْنًا عَلَى وَهْنٍ وَفِصَالُهُ فِي عَامَيْنِ أَنِ اشْكُرْ لِي وَلِوَالِدَيْكَ إِلَيَّ الْمَصِيرُ
And We have enjoined upon man concerning his parents. His mother bears him in weakness upon weakness, and his weaning is in two years. Give thanks unto Me and unto thy parents. Unto Me is the journeying.
The two years mentioned above are lunar years, which come to approximately 708(.74) days.
وَوَصَّيْنَا الْإِنسَانَ بِوَالِدَيْهِ إِحْسَانًا حَمَلَتْهُ أُمُّهُ كُرْهًا وَوَضَعَتْهُ كُرْهًا وَحَمْلُهُ وَفِصَالُهُ ثَلَاثُونَ شَهْرًا حَتَّى إِذَا بَلَغَ أَشُدَّهُ وَبَلَغَ أَرْبَعِينَ سَنَةً قَالَ رَبِّ أَوْزِعْنِي أَنْ أَشْكُرَ نِعْمَتَكَ الَّتِي أَنْعَمْتَ عَلَيَّ وَعَلَى وَالِدَيَّ وَأَنْ أَعْمَلَ صَالِحًا تَرْضَاهُ وَأَصْلِحْ لِي فِي ذُرِّيَّتِي إِنِّي تُبْتُ إِلَيْكَ وَإِنِّي مِنَ الْمُسْلِمِينَ
And We have commended unto man kindness toward parents. His mother bears him with reluctance, and brings him forth with reluctance, and the bearing of him and the weaning of him is thirty months, till, when he attains full strength and reaches forty years, he says: My Lord! Arouse me that I may give thanks for the favour wherewith Thou hast favoured me and my parents, and that I may do right acceptable unto Thee. And be gracious unto me In the matter of my seed. Lo! I have turned unto Thee repentant, and lo! I am of those who surrender (unto Thee).
Thirty lunar months are approximately 885(.925) days, where the average lunar month is taken to be 29.5(3) days. So the number of days that the soul is in the baby during the average pregnancy is 885 (bearing and weaning) – 708 (weaning) = 177 days = 25 weeks and 2 days.
The average pregnancy from the date of the last known menstruation is about 40 weeks, or 280 days. Now it is estimated that implantation takes place about 1 week after conception, which is on average 3 weeks after the last known menstruation, this means that the average time the organism/fetus/baby is carried is 37 weeks, or 259 days.
259 – 177 = 82 days. This is the number of days the organism/fetus/baby is in the womb before the soul is introduced. This is 11 weeks and 5 days.
To put this in more common terms, duration of pregnancy is taken to be around 40 weeks counting from the last noted menstrual cycle before conception, so this is 280 days. So just add 21 days/ 3 weeks to the above figures if you wish to work within the LMP/LNMP timing framework. So this means: -
The soul comes in to the baby 14 weeks and 5 days after LMP/LNMP.
I think the issue of being able to abort a foetus with handicaps, be they mental or otherwise is something that parents can do, as long as it is within the 82 (from implantation)/103 (LMP) days. As regards children born with defects, then unfortunate as that is, killing them would not be something that can be allowed after that point.
A verse commonly noted against this view is: -
وَلاَ تَقْتُلُوۤاْ أَوْلادَكُمْ خَشْيَةَ إِمْلاقٍ نَّحْنُ نَرْزُقُهُمْ وَإِيَّاكُم إنَّ قَتْلَهُمْ كَانَ خِطْئاً كَبِيراً
And do not kill your children for fear of poverty. We provide for them and for you. Indeed, their killing is ever a great sin.
The highlighted term above refers to that which is begotten, a baby in the womb is not begotten, and if it has no soul, then it is not murder.