The Buddha explains the six kinds of persons found in the world based on their mental qualities and understanding of the teachings.
Migasālā sutta - Migasālā
Then, in the morning, Venerable Ānanda dressed, took his bowl and robe, and went to the residence of the laywoman Migasālā. Having arrived, he sat down on the prepared seat.
Then, the laywoman Migasālā approached Venerable Ānanda. After approaching, she paid her respects to him and sat down to one side. Sitting to one side, Migasālā addressed Venerable Ānanda, saying, "Venerable Ānanda, just how should this Dhamma that has been taught by the Blessed One be understood, where a celibate practitioner and a non-celibate practitioner might attain an identical destination in the next life?
My father Purāṇa, venerable sir, was a celibate practitioner, living apart and abstaining from sexual intercourse, which is the common practice of laypeople. When he passed away, the Blessed One declared that he had attained the stage of a once-returner and was reborn in the Tusita heaven.
My paternal uncle Isidatta, venerable sir, was a non-celibate practitioner, but was content living with his wife. When he passed away, the Blessed One declared that he had attained the stage of a once-returner and was reborn in the Tusita heaven.
Venerable Ānanda, just how should this Dhamma that has been taught by the Blessed One be understood, where a celibate practitioner and a non-celibate practitioner might attain an identical destination in the next life?"
"It was indeed in this way, sister, that the Blessed One declared it."
Then, venerable Ānanda, having received alms food at the residence of the laywoman Migasālā, rose from his seat and departed. Later, after his meal and upon returning from alms, venerable Ānanda went to the Blessed One. Having arrived, he paid his respects to the Blessed One and sat down to one side. Sitting to one side, venerable Ānanda addressed the Blessed One:
"Venerable sir, earlier this morning, I dressed, took my bowl and robe, and went to the residence of the laywoman Migasālā. Upon arriving, I sat down on the prepared seat. Then, venerable sir, the laywoman Migasālā approached me. After approaching, she paid her respects to me and sat down to one side. Once seated to one side, she said to me, 'Venerable Ānanda, just how should this Dhamma that has been taught by the Blessed One be understood, where a celibate practitioner and a non-celibate practitioner might attain an identical destination in the next life? My father, Purāṇa, venerable sir, was a celibate practitioner, living apart and abstaining from sexual intercourse, which is the common practice of laypeople. When he passed away, the Blessed One declared that he had attained the stage of a once-returner and was reborn in the Tusita heaven. However, my paternal uncle, Isidatta, venerable sir, was a non-celibate practitioner, yet he was content living with his wife. When he passed away, the Blessed One declared that he too had attained the stage of a once-returner and was reborn in the Tusita heaven. Venerable Ānanda, just how should this Dhamma that has been taught by the Blessed One be understood, where a celibate practitioner and a non-celibate practitioner might attain an identical destination in the next life?' When she said this, venerable sir, I replied to the laywoman Migasālā, 'It was indeed in this way, sister, that the Blessed One declared it.'"
"And Ānanda, who indeed is the laywoman Migasālā—an immature person, inexperienced, and influenced by her mother's mind and wisdom; and who can understand the superior and inferior faculties of individuals? There are, Ānanda, these six kinds of persons found existing in the world. What six?
1 Here, Ānanda, there is a certain person who is gentle and easy to live with, and their fellow practitioners appreciate dwelling together with them. Yet they have not heard [the teachings], nor become learned [in them], nor have they penetrated [them] by view, and they do not attain even temporary liberation. After the breakup of the body, after death, they go towards a state of decline, not towards distinction; they are indeed on a path of decline, not on a path of distinction.
2 Here further, Ānanda, there is a certain person who is gentle and easy to live with, and their fellow practitioners appreciate dwelling together with them. They have heard [the teachings], become learned [in them], have penetrated [them] by view, and they also attain temporary liberation. After the breakup of the body, after death, they go towards distinction, not towards a state of decline; they are indeed on a path of distinction, not on a path of decline.
In this case, Ānanda, some people with limited understanding measure others, thinking: 'This person has the same qualities as that person, so why is one considered inferior and the other superior?' This leads to their harm and suffering for a long time.
In this case, Ānanda, the certain person who is gentle and easy to live with, and their fellow practitioners appreciate dwelling together with them, who has heard [the teachings], become learned [in them], and have penetrated [them] by view, who attains temporary liberation, is more excellent and more sublime than the other person. For what reason? Because, Ānanda, this person is carried along by the stream of the Dhamma. But who can know this difference except the Tathāgata?
Therefore, Ānanda, do not be among those who measure people, do not make judgments about people. For, Ānanda, one who measures people is harmed. Either I, Ānanda, or someone who is like me might measure people.
3 Here, Ānanda, there is a certain person who has anger and pride ingrained within, and from time to time, greed arises within them. They have not heard the teachings, nor become learned in them, nor have they penetrated them by view, and they do not attain even temporary liberation. After the breakup of the body, after death, they go towards a state of decline, not towards distinction; they are indeed on a path of decline, not on a path of distinction.
4 Here further, Ānanda, there is a certain person who has anger and pride ingrained within, and from time to time, greed arises within them. They have heard the teachings, become learned in them, have penetrated them by view, and they also attain temporary liberation. After the breakup of the body, after death, they go towards distinction, not towards a state of decline; they are indeed on a path of distinction, not on a path of decline.
In this case, Ānanda, some people with limited understanding measure others, thinking: 'This person has the same qualities as that person, so why is one considered inferior and the other superior?' This leads to their harm and suffering for a long time.
In this case, Ānanda, the certain person who has anger and pride ingrained within, and from time to time, greed arises within them, who has heard the teachings, become learned in them, and have penetrated them by view, who attains temporary liberation, is more excellent and more sublime than the other person. For what reason? Because, Ānanda, this person is carried along by the stream of the Dhamma. But who can know this difference except the Tathāgata?
Therefore, Ānanda, do not be among those who measure people, do not make judgments about people. For, Ānanda, one who measures people is harmed. Either I, Ānanda, or someone who is like me might measure people.
5 Here, Ānanda, there is a certain person who has anger and pride ingrained within, and from time to time, impulsive or harmful speech arisen in them. They have not heard the teachings, nor become learned in them, nor have they penetrated them by view, and they do not attain even temporary liberation. After the breakup of the body, after death, they go towards a state of decline, not towards distinction; they are indeed on a path of decline, not on a path of distinction.
6 Here further, Ānanda, there is a certain person who has anger and pride ingrained within, and from time to time, impulsive or harmful speech arises within them. They have heard the teachings, become learned in them, have penetrated them by view, and they also attain temporary liberation. After the breakup of the body, after death, they go towards distinction, not towards a state of decline; they are indeed on a path of distinction, not on a path of decline.
In this case, Ānanda, some people with limited understanding measure others, thinking: 'This person has the same qualities as that person, so why is one considered inferior and the other superior?' This leads to their harm and suffering for a long time.
In this case, Ānanda, the certain person who has anger and pride ingrained within, and from time to time, impulsive or harmful speech arises within them, who has heard the teachings, become learned in them, and have penetrated them by view, who attains temporary liberation, is more excellent and more sublime than the other person. For what reason? Because, Ānanda, this person is carried along by the stream of the Dhamma. But who can know this difference except the Tathāgata?
Therefore, Ānanda, do not be among those who measure people, do not make judgments about people. For, Ānanda, one who measures people is harmed. Either I, Ānanda, or someone who is like me might measure people.
And Ānanda, who indeed is the laywoman Migasālā—an immature person, inexperienced, and influenced by her mother's mind and wisdom; and who can understand the superior and inferior faculties of individuals. There are, Ānanda, these six kinds of persons found existing in the world.
Ānanda, if Isidatta had possessed the same kind of virtuous behavior that Purāṇa had, Purāṇa could not have even known his destination. And if Purāṇa had possessed the same kind of wisdom that Isidatta had, Isidatta could not have even known his destination. In this way, Ānanda, these two persons were each deficient in one respect."