Righteousness is God's gift in Christ to believers. Upon trusting in Christ, believers are accounted righteous through our Savior and Lord. It's known as imputed righteousness. Through faith in Christ, you are accounted righteous before God. It is never self-righteousness, but the righteousness of God in Christ.
Believers are righteous by faith in the gospel of Christ. The apostle Paul speaks of the righteousness of Christ imputed to believers. "For He made Him who knew no sin to be sin for us, that we might become the righteousness of God in Him" (2 Corinthians 5:21). Martin Luther called it the great exchange. Christ takes away our sin and gives us His righteousness.
Believers are righteous by faith in Christ alone. The Christian life can never be based upon our self-righteousness, which is as filthy rags before God (Isaiah 64:6). To the contrary, you give up your self-righteousness, and become righteous before God in Christ alone. Christ gives us perfect righteousness from God. Simply stated, believers are righteous in Christ alone.
Believers are accounted righteous in Christ alone. Our sins are imputed to Christ as our sacrifice for sin at the cross. His righteousness is credited to us by faith alone. There is only one way we can be righteous with God. We are the righteousness of God by faith in Christ alone.