Righteousness is based on obedience to two commandments.
Mark 12:30-31 And thou shalt love the Lord thy God with all thy heart, and with all thy soul, and with all thy mind, and with all thy strength: this is the first commandment. 31 And the second is like, namely this, Thou shalt love thy neighbour as thyself.
Matthew 22:40 On these two commandments hang all the law and the prophets.
Jesus Christ explains how we should behave in what is called ‘the sermon on the mount’ which begins in Matthew 5.
Matthew 5:17-48 Think not that I am come to destroy the law, or the prophets: I am not come to destroy, but to fulfil. 18 For verily I say unto you, Till heaven and earth pass, one jot or one tittle shall in no wise pass from the law, till all be fulfilled. 19 Whosoever therefore shall break one of these least commandments, and shall teach men so, he shall be called the least in the kingdom of heaven: but whosoever shall do and teach them, the same shall be called great in the kingdom of heaven. 20 For I say unto you, That except your righteousness shall exceed the righteousness of the scribes and Pharisees, ye shall in no case enter into the kingdom of heaven.21 Ye have heard that it was said by them of old time, Thou shalt not kill; and whosoever shall kill shall be in danger of the judgment: 22 But I say unto you, That whosoever is angry with his brother without a cause shall be in danger of the judgment: and whosoever shall say to his brother, Raca, shall be in danger of the council: but whosoever shall say, Thou fool, shall be in danger of hell fire. 23 Therefore if thou bring thy gift to the altar, and there rememberest that thy brother hath ought against thee; 24 Leave there thy gift before the altar, and go thy way; first be reconciled to thy brother, and then come and offer thy gift. 25 Agree with thine adversary quickly, whiles thou art in the way with him; lest at any time the adversary deliver thee to the judge, and the judge deliver thee to the officer, and thou be cast into prison. 26 Verily I say unto thee, Thou shalt by no means come out thence, till thou hast paid the uttermost farthing. 27 Ye have heard that it was said by them of old time, Thou shalt not commit adultery: 28 But I say unto you, That whosoever looketh on a woman to lust after her hath committed adultery with her already in his heart. 29 And if thy right eye offend thee, pluck it out, and cast it from thee: for it is profitable for thee that one of thy members should perish, and not that thy whole body should be cast into hell. 30 And if thy right hand offend thee, cut it off, and cast it from thee: for it is profitable for thee that one of thy members should perish, and not that thy whole body should be cast into hell. 31 It hath been said, Whosoever shall put away his wife, let him give her a writing of divorcement: 32 But I say unto you, That whosoever shall put away his wife, saving for the cause of fornication, causeth her to commit adultery: and whosoever shall marry her that is divorced committeth adultery. 33 Again, ye have heard that it hath been said by them of old time, Thou shalt not forswear thyself, but shalt perform unto the Lord thine oaths: 34 But I say unto you, Swear not at all; neither by heaven; for it is God’s throne: 35 Nor by the earth; for it is his footstool: neither by Jerusalem; for it is the city of the great King. 36 Neither shalt thou swear by thy head, because thou canst not make one hair white or black. 37 But let your communication be, Yea, yea; Nay, nay: for whatsoever is more than these cometh of evil. 38 Ye have heard that it hath been said, An eye for an eye, and a tooth for a tooth: 39 But I say unto you, That ye resist not evil: but whosoever shall smite thee on thy right cheek, turn to him the other also. 40 And if any man will sue thee at the law, and take away thy coat, let him have thy cloke also. 41 And whosoever shall compel thee to go a mile, go with him twain. 42 Give to him that asketh thee, and from him that would borrow of thee turn not thou away. 43 Ye have heard that it hath been said, Thou shalt love thy neighbour, and hate thine enemy. 44 But I say unto you, Love your enemies, bless them that curse you, do good to them that hate you, and pray for them which despitefully use you, and persecute you; 45 That ye may be the children of your Father which is in heaven: for he maketh his sun to rise on the evil and on the good, and sendeth rain on the just and on the unjust. 46 For if ye love them which love you, what reward have ye? do not even the publicans the same? 47 And if ye salute your brethren only, what do ye more than others? do not even the publicans so? 48 Be ye therefore perfect, even as your Father which is in heaven is perfect.
Matthew 6:1-34 Take heed that ye do not your alms before men, to be seen of them: otherwise ye have no reward of your Father which is in heaven. 2 Therefore when thou doest thine alms, do not sound a trumpet before thee, as the hypocrites do in the synagogues and in the streets, that they may have glory of men. Verily I say unto you, They have their reward. 3 But when thou doest alms, let not thy left hand know what thy right hand doeth: 4 That thine alms may be in secret: and thy Father which seeth in secret himself shall reward thee openly.5 And when thou prayest, thou shalt not be as the hypocrites are: for they love to pray standing in the synagogues and in the corners of the streets, that they may be seen of men. Verily I say unto you, They have their reward. 6 But thou, when thou prayest, enter into thy closet, and when thou hast shut thy door, pray to thy Father which is in secret; and thy Father which seeth in secret shall reward thee openly. 7 But when ye pray, use not vain repetitions, as the heathen do: for they think that they shall be heard for their much speaking. 8 Be not ye therefore like unto them: for your Father knoweth what things ye have need of, before ye ask him. 9 After this manner therefore pray ye: Our Father which art in heaven, Hallowed be thy name. 10 Thy kingdom come. Thy will be done in earth, as it is in heaven. 11 Give us this day our daily bread. 12 And forgive us our debts, as we forgive our debtors. 13 And lead us not into temptation, but deliver us from evil: For thine is the kingdom, and the power, and the glory, for ever. Amen. 14 For if ye forgive men their trespasses, your heavenly Father will also forgive you: 15 But if ye forgive not men their trespasses, neither will your Father forgive your trespasses. 16 Moreover when ye fast, be not, as the hypocrites, of a sad countenance: for they disfigure their faces, that they may appear unto men to fast. Verily I say unto you, They have their reward. 17 But thou, when thou fastest, anoint thine head, and wash thy face; 18 That thou appear not unto men to fast, but unto thy Father which is in secret: and thy Father, which seeth in secret, shall reward thee openly. 19 Lay not up for yourselves treasures upon earth, where moth and rust doth corrupt, and where thieves break through and steal: 20 But lay up for yourselves treasures in heaven, where neither moth nor rust doth corrupt, and where thieves do not break through nor steal: 21 For where your treasure is, there will your heart be also. 22 The light of the body is the eye: if therefore thine eye be single, thy whole body shall be full of light. 23 But if thine eye be evil, thy whole body shall be full of darkness. If therefore the light that is in thee be darkness, how great is that darkness! 24 No man can serve two masters: for either he will hate the one, and love the other; or else he will hold to the one, and despise the other. Ye cannot serve God and mammon. 25 Therefore I say unto you, Take no thought for your life, what ye shall eat, or what ye shall drink; nor yet for your body, what ye shall put on. Is not the life more than meat, and the body than raiment? 26 Behold the fowls of the air: for they sow not, neither do they reap, nor gather into barns; yet your heavenly Father feedeth them. Are ye not much better than they? 27 Which of you by taking thought can add one cubit unto his stature? 28 And why take ye thought for raiment? Consider the lilies of the field, how they grow; they toil not, neither do they spin: 29 And yet I say unto you, That even Solomon in all his glory was not arrayed like one of these. 30 Wherefore, if God so clothe the grass of the field, which to day is, and to morrow is cast into the oven, shall he not much more clothe you, O ye of little faith? 31 Therefore take no thought, saying, What shall we eat? or, What shall we drink? or, Wherewithal shall we be clothed? 32 (For after all these things do the Gentiles seek:) for your heavenly Father knoweth that ye have need of all these things. 33 But seek ye first the kingdom of God, and his righteousness; and all these things shall be added unto you. 34 Take therefore no thought for the morrow: for the morrow shall take thought for the things of itself. Sufficient unto the day is the evil thereof.
Matthew 7:1-5 Judge not, that ye be not judged. 2 For with what judgment ye judge, ye shall be judged: and with what measure ye mete, it shall be measured to you again. 3 And why beholdest thou the mote that is in thy brother’s eye, but considerest not the beam that is in thine own eye? 4 Or how wilt thou say to thy brother, Let me pull out the mote out of thine eye; and, behold, a beam is in thine own eye? 5 Thou hypocrite, first cast out the beam out of thine own eye; and then shalt thou see clearly to cast out the mote out of thy brother’s eye.
The problem is that we fail to keep these commandments, with the result that none of us is righteous of ourselves.
Romans 5:12 Wherefore, as by one man sin entered into the world, and death by sin; and so death passed upon all men, for that all have sinned:
Romans 3:10 As it is written, There is none righteous, no, not one:
Romans 3:23 For all have sinned, and come short of the glory of God;
We cannot, by our own righteousness, attain unto the kingdom of God. God is willing to count faith in the sacrifice of his Son for righteousness.
Romans 3:19-22 Now we know that what things soever the law saith, it saith to them who are under the law: that every mouth may be stopped, and all the world may become guilty before God. 20 Therefore by the deeds of the law there shall no flesh be justified in his sight: for by the law is the knowledge of sin. 21 But now the righteousness of God without the law is manifested, being witnessed by the law and the prophets; 22 Even the righteousness of God which is by faith of Jesus Christ unto all and upon all them that believe: for there is no difference:
To attain to righteousness by faith we must believe and obey the gospel preached by Jesus Christ and his apostles.
Christ commissioned his apostles:
Mark 16:15-16 And he said unto them, Go ye into all the world, and preach the gospel to every creature. 16 He that believeth and is baptized shall be saved; but he that believeth not shall be damned (condemned).
At Pentecost Peter said:
Acts 2:38 ...Repent, and be baptized every one of you in the name of Jesus Christ for the remission of sins…
Repent means to change the way that we live.
Baptism is by complete immersion in water for the remission of past sins.
Acts 22:16 And now why tarriest thou? arise, and be baptized, and wash away thy sins, calling on the name of the Lord.
After baptism we must live a new life.
Romans 6:4 Therefore we are buried with him by baptism into death: that like as Christ was raised up from the dead by the glory of the Father, even so we also should walk in newness of life.
This new life must be lived by Christ’s commandments.
John 14:15 If ye love me, keep my commandments.
John 15:13 Greater love hath no man than this, that a man lay down his life for his friends. 14 Ye are my friends, if ye do whatsoever I command you.
Luke 6:46 And why call ye me, Lord, Lord, and do not the things which I say?
After baptism we will still sin, but if we are making a determined effort to live by Chris’s commandments our sins will be forgiven by confession in prayer.
1 John 1:7-9 …if we walk in the light, as he is in the light, we have fellowship one with another, and the blood of Jesus Christ his Son cleanseth us from all sin. 8 If we say that we have no sin, we deceive ourselves, and the truth is not in us. 9 If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness.
Those who would be counted righteous must seek the righteousness which is by faith in Jesus Christ.
Philippians 3:8-9 Yea doubtless, and I count all things but loss for the excellency of the knowledge of Christ Jesus my Lord: for whom I have suffered the loss of all things, and do count them but dung, that I may win Christ, 9 And be found in him, not having mine own righteousness, which is of the law, but that which is through the faith of Christ, the righteousness which is of God by faith:
I hope you find this helpful.