Depends on how far you want to shoot. 1000 yards? Even 24" barrels should keep you supersonic through that range. Gunwerks ballistic calculator shows that FGMM .300wm is supersonic to about 1400 yards.
The standard for production rifles right now seems to be 26", so you won't find much variance from that unless you go with a custom barrel.
After 26" I think BC will be more important than barrel length for velocity. An extra 2" is gonna get you what, 100 fps, if you're lucky? That barely keeps you supersonic an extra 100 yards. Now the extra length could be beneficial for adding weight and managing recoil. Or it could be a nuisance if you don't have a folding stock.
What are the specifics of the build you have in mind?