Apply the compound interest formula:
A = P (1 + r/n)^nt
Where:
A = value after interest = 26,624.15
P = principal value = 21,000
r= interest rate in decimal form (divided by 100) = 4/100= 0.04
n= number of compounding periods in each year = 4
t= years
Replacing:
26,624.15 = 21,000 ( 1+ 0.04/4) ^4t
Solve for t:
26,624.15/21,000 = 1.01^4t
1.27 = 1.01 ^4t
log 1.27 = 4t log 1.01
log 1.27/ log 1.01 = 4t
23.84 = 4 t
23.84 /4 = t
5.96 years = t