I only can cite two examples.
First, a .22 LR is generally accepted to run out of expansion volume after 20" of barrel. After that, drag time.
And I read in a gunrag once about a guy and his 'smith friend who had bundle of .30-cal barrle-liner stock that was in (I think) 10' lengths. These two contrived a way to gas-tight-link these blanks end-to-end, and ran the piddliest centerfire round they could think of to experiment with, i.e. the .32 S&W. Not the Long, the original one you put in those tiny little top-break Ivers. they tried several rounds, and sdome petered out at about 18" or so, while some would go as far as about 28-29' IIRC.
.32 S&W's an old black-powder number, and I imagine it typically runs as low as 12,000-16,000 psi, much like a .38 Special. That makes me think a high-power rifle round would require a lo-o-o-ng barrel to halt a bullet. I really have no idea about how to figure the math, but someone who remembers more chemistry than I do could probably work out the amount of combustion products for a given weight of powder presuming you knew it's precise composition, which might give you an idea.