Here is Romans Chapter 4 in its entirety. I’ve been thinking about it:

What shall we say, then? Have we found Abraham to be our ancestor in a human, fleshly sense? After all, if Abraham was reckoned ‘in the right’ on the basis of works, he has grounds to boast – but not in God’s presence!
So what does the Bible say? ‘Abraham believed God, and it was calculated in his favour, putting him in the right.’ Now when someone ‘works’, the ‘reward’ they get is not calculated on the basis of generosity, but on the basis of what they are owed. But if someone doesn’t ‘work’, but simply believes in the one who declares the ungodly to be in the right, that person’s faith is calculated in their favour, putting them in the right.
We see the same thing when David speaks of the blessing that comes to someone whom God calculates to be in the right apart from works:
Blessed are those whose lawbreaking is forgiven
and whose sins have been covered over;
Blessed is the man to whom the Lord will not calculate sin.