Compounding, also known as interest upon interest, is a system that calculates interest or capital gains on an investment based on the…