Most people understand that doing evil can keep us out of heaven. But few realize the Bible also teaches that doing good cannot get us in. None of us could ever gain enough merit to deserve heaven. We are sinful, and God's standard is utter perfection. Jesus said, "Unless your righteousness exceeds the righteousness of the scribes and Pharisees, you will by no means enter the kingdom of heaven" (Matthew 5:20). He added, "you are to be perfect, as your heavenly Father is perfect."
Then who can be saved?
The disciples asked Jesus this same question (Matthew 19:25). His answer? "With men this is impossible, but with God all things are possible" (v. 26). In other words, our salvation is not something we can accomplish. It is something God must do for us.
What if I stopped sinning now and never sinned again?
We are hopelessly in bondage to sin and could not cease sinning no matter how hard we tried. Scripture says even our hearts are deceitful and desperately wicked (Jeremiah 17:9). In other words, we are sinful to the core. Furthermore, a single sin would be enough to destroy us forever: "Whoever shall keep the whole law, and yet stumble in one point, he is guilty of all" (James 2:10). But even if we never sinned from now on, we still bear the guilt of our past sins. And "the wages of sin is death" (Romans 6:23).
Is there any way to be free from the guilt of sin?
The Bible says, "The blood of Jesus ... cleanses us from all sin" (1 John 1:7).
How can Jesus' blood cleanse our sins?
When God forgives, He doesn't merely overlook sin. Atonement must be made. Christ's death made full atonement for those who trust Him. His dying counts in our stead if we believe. However, that only erases the guilt of our sin. Remember, we still need perfect righteousness in order to enter the kingdom of heaven (Matthew 5:20).
Where do we get that perfect righteousness?
The full merit of Jesus' righteousness is imputed, or credited, to those who trust Him alone for salvation. Scripture teaches that God "justifies the ungodly" by reckoning Christ's righteousness to them (Romans 4:5). They are clothed in His righteousness, and God accepts believers solely and exclusively on that basis. That's why Paul was willing to discard all his own efforts to earn God's favor, preferring instead to stand before God robed in a righteousness that was not his own (Philippians 3:8-9).
If you are not a Christian, you need to lay hold of this truth by faith: the sin that will keep you out of heaven has no cure but the blood of Christ. If you are weary of your sin and exhausted from the load of your guilt, He tenderly holds forth the offer of life and forgiveness and eternal rest to you: "Come to Me, all you who labor and are heavy laden, and I will give you rest" (Matthew 11:28).
How can I be sure Christ will save me?
No one will be turned away: "The one who comes to Me I will by no means cast out" (John 6:37). All are invited: "The Spirit and the bride say, "Come!" And let him who hears say, "Come!" And let him who thirsts come. Whoever desires, let him take the water of life freely" (Revelation 22:17).
-John MacArthur (http://www.gty.org/resources/questions/QA102#.TrmsVnLpc0B)