Does a longer barrel give better accuracy?
I may start building another AR. I want to stick with .223Rem caliber. I want this one to be a more accurate gun so, I was wondering what advantage a longer barrel might have?
I know thw answer if we're talking about shotguns, but not rifles.
This is a 2 part answer:
1. No. Within practical lengths and reasoning, the length of the barrel is one part of about 5 factors for determining absolute accuracy. But suffice to say, I hit things out to 500yds to get my marksman about 24 years ago with a 20"barrel. Conversely, I hit out to 300 with a 14.5" barrel with something like 50,000+ rounds thru it; it was a training rifle.
2. Yes. The length of the barrel plays an effect in the pressure developed in the barrel, meaning the bullet can achieve better/ max. velocity and thus carry itself on a better trajectory downrange. Barrel length WILL deliver more energy farther downrange. Short barrels leave unburned powder, or the powder burns out the barrel as the bullet is leaving- which means wasted energy. The longer barrel, when equipped with iron sights will give a better sight profile, making for better potential aligning of a target- not better accuracy, but better aiming.
Factors for absolute accuracy: 1. Bore/ rifling. The type of rifling, and the quality of the bore are paramount to absolute accuracy. If the rifling is too tight, if the rifling is not well formed, you lose accuracy. 2. Throat and leade. This is super important, because when a round first fires and the bullet starts moving, it is not on the rifling. It is in the throat of the barrel. The shorter that distance between the sides of the bullet and the rifling, the less yaw the bullet will have when it makes first contact with the threads. Conversely, when the throat gets burned up, the bullet does not seat as true and has a little cock-eyed entry into the barrel, which on the other end leads to less accurate flying. Throat erosion is more common on higher velocity charges and rounds. Anything going much over 3000FPS is starting to burn barrels. A 243 leaving a barrel at 3300FPS is an amazing thing- screamer, but the barrel life is actually about 500-900rounds. (Absolute accuracy. Don't confuse with hunting accuracy.) 3. Twist. Match the twist to the weight of the bullet. Bigger calibers will need a bit less customizing in this aspect, if bullet constructions are similar. A 30-06 with 1/10 rifling will handle most any bullet from 140-200gr. pretty equally, with the weight and powder charge of said projectile determining trajectory, but accuracy is fairly equal for most weights in a given range. With a small bullet- the weight and speed have more to do with it, as the lighter bullets tend to be of a less robust design, and with too tight a twist, they can fly wild, or tear themselves apart from the spin applied to them.
4. Bullet and charge. Bullet and charge matching mean much more to accuracy than most anything else. Some rifles just love a lot of ammo. Some are very picky, and can deliver amazing results when the right ammo is found, or made for the barrel. Also, bullet CG is very important. A longer, more stable in flight bullet will deliver better accuracy as it will handle itself in wind much better. A short sided bullet is much more likely to fly wild the further out you get. Explanation: A long bed double cab truck is slower turning, but very stable down the road. A Jeep CJ7 is squirrely and steers very quickly. Charge; some powders deliver more consistent pressure. Some deliver higher pressures. Some burn quicker, some slower. Each has its' reasons, and reloaders and bullet designers take years getting this voodoo to work for them. And then there is the guys at LAX Firing Range, who sweep ALL powders from the top of the table into a pile, and reload all ammo with the same stuff.... so one round leaves the barrel breaking the speed of light, and the next one farts and exits the barrel with all the force of a '67 VW Bug.

5. Crown. While the crown allows for a 'clean finish' as a beer afficianado would say...... I am more of the Bud Light crowd. The finish is not all it's cracked up to be, so long as there is another beer in the ice chest.

I have seen rifles where the crown is jeweled and every effort was made to get just the perfect angles to allow the bullet to leave the barrel with the perfect expulsion of gases behind it so as to not disrupt the tail turbulence from the bullet, allowing better tracking.
AND THEN I shot my best ever group with a hunting rifle which has a dinged crown because the nose got bounced off a rock, and I had to scrape a shaving off the edge of the crown with a sharpening stone out in the field, maybe 200 rounds and 4 years prior. What can I say??? That rifle REALLY likes Winchester XPII ammo.
Yep. Those 5 are the cover points.