Start with your batteries, not the nailer. Every gun on this list is good enough to hang casing all day, so the platform you already own settles most arguments before they start. A finish nailer is a sometimes-tool for most people, and buying into a second battery system for one is how you end up with four chargers and a drawer full of orphans. Remember the walls between platforms: Milwaukee M12 and M18 don't mix, Ryobi 18V ONE+ and 40V don't mix, Makita 18V LXT won't fit 40V XGT, and while a DeWalt FLEXVOLT pack runs 20V MAX tools just fine, a 20V MAX battery will never power a 60V tool.
With that sorted, here's how I'd split the field after years of watching these guns on trim jobs.
If trim is your trade
Two guns belong in a production van. The Milwaukee 2841-20 M18 FUEL is the one I'd grab first. Its nitrogen air-spring drive fires the instant you pull the trigger, no flywheel spin-up, and it feeds 1-1/4 to 2-1/2 inch angled 16-gauge nails from a 110-nail magazine. Figure around 800 nails from a compact CP2.0 pack, which is a full day of casing and base for most crews. The angled magazine reaches into corners a straight gun can't. The catch is weight; with a battery aboard it's the north side of seven pounds, and you'll feel it on a long crown run overhead.
The other pro pick is the Metabo HPT NT1865DMA. Metabo HPT's Air Spring Drive is the closest any cordless gun comes to the feel of a pneumatic, recoil and all, and this is one of the lightest 16-gauge cordless nailers you can buy, which matters more at hour six than any spec sheet suggests. It takes straight nails from 1 to 2-1/2 inches and carries a lifetime tool warranty, the best coverage in the business. The honest downside is the dealer network; Home Depot carries the brand, but service and accessory depth still trail red and yellow.
If you remodel and the nailer is one tool of forty
The DeWalt DCN660B is the value verdict of the whole class, and it isn't close. Brushless motor, 110-nail angled magazine, the same 1-1/4 to 2-1/2 inch range as the Milwaukee, and roughly 800 shots from a slim 2.0Ah pack, all at a bit over six pounds with battery. It's been on the market for years, which cuts both ways: the design is older and there's no fancy drive tech, but every quirk is documented and refurbished units are everywhere. If you're already on 20V MAX, buy it and stop reading.
Punch-list workers should also look hard at the Makita XNB02Z. Its party trick is runtime, up to 1,000 nails on an LXT 5.0Ah battery, the best on this list. Drive quality into hardwood is excellent. The price you pay is mass: about 8.4 pounds with that 5.0Ah pack, the heaviest here. On a bench or baseboard it doesn't matter. Overhead, it does.
If you're a homeowner with a Ryobi charger
Buy the Ryobi P326 AirStrike and don't overthink it. It sinks 16-gauge nails from 3/4 to 2-1/2 inches, holds 105 in the magazine, runs up to 1,000 shots per charge, and shares batteries with the drill, the fan, and whatever else is in your garage. It won't keep pace with the pro guns on speed, and the mostly plastic build reflects the price. For window casing on a Saturday and quarter-round next spring, none of that matters.
Straight vs angled, and what I'd buy
One decision people skip: magazine style. Angled magazines (Milwaukee, DeWalt) sneak into inside corners and tight framing better; straight magazines (Metabo HPT, Makita, Ryobi) use cheaper, easier-to-find nail strips at any hardware store. Neither is wrong. Corners favor angled, the wallet favors brad-aisle availability. Check which strips your local store actually stocks before you commit, because a gun you can't feed on a Sunday is a paperweight.
My own money, ignoring platforms for a second: the Milwaukee 2841-20 for daily trim work, the DeWalt DCN660B for everyone who wants 90% of that gun for less. And if your ceilings are tall and your arms know it, the light weight of the Metabo HPT is worth switching platforms for. That's the only gun here I'd say that about.