A very basic formula would be:
damageAfterArmorCalc = damageAmt*(1-armorReductionPercent)
damageAmt Is the original amount of damage to be done.
armorReductionPercent is the percent of damage the armor negates, this percentage should be a value from 0 to 1, so the 20% in your example would be
.2. If we're doing 100 damage initially, we can look at some examples for what that does.
So what's happening here, if the armor does not negate any damage, then we get:
100 * (1 - 0) = 100*1 = 100
As you know, any number multiplied by one is still that number. Now if the armor negates 100% of damage, we would get
100 * (1 - 1) = 100*0 = 0
Since any number multiplied by zero is zero. Now we know it works for both extremes, how about the inbetween values? Say it negates 20% of damage as in your example. , we can see how that looks:
100 * (1 - .2) = 100*.8 = 80
We know that 20% of 100 is 20, and that 100 minus 20 is 80. So it looks like this works just fine.
I suggest you look into some basic math tutorials and get the basics down. Khan academy is a great resource for this.