Not to be taken as gospel, and it depends on a lot of factors, but a fair rule of thumb is that you lose (or gain) about 50 fps for every inch of barrel. So a given load from a 26" barrel will have a bullet velocity about 200 FPS greater than one from a 22" barrel.
Sometimes people read that for a given rifle the "powder is all burned within x inches, so the bullet slows down after that." Certainly there is a point where greater barrel length will cause a bullet to slow down and eventually stop, but that point is well beyond any reasonable barrel length in a realistic rifle. But the assumption that when the powder is consumed the pressure drops to nothing is false (if that were true, the bullet would never exit). Even after the powder is burned up, the hot gas keeps expanding and pushing the bullet and that will continue until the bullet exits or, in our hypothetical lengthy barrel, stops as the gas cools and stops expanding.