Welcome!!!I don't think there's a scientific formula,but my brother got a 10 gallon that took about a month to cycle.However,he didn't have too many fish in it.
If you have 3-4 fish in there to cycle it,it would probably take about 3 weeks.If you have 2,I'd guess 1 month.
Then again,it can also depend on the size of the fish.The time varies.
If you use the fish I recomend for cycling(3 zebra danios and a swordtail)that would be 3 weeks.But I'm guessing you don't have those exactly,so if you want an average, 3 weeks is my guess. sorry tis is a bit long,but there's alot of factors.