....and to get technical, the invoice price is not the actual cost to the dealer. Actual cost is affected by several incentive and rebate payments. Those incentive payments can be from financing rebates, commissions on warranties, mfr volume incentives, mfr/dealer hold back, and more. It's like invoice is the official dealer price, but then the dealer gets discounts/rebates that reduce the actual cost to less than invoice. So even buying a car at invoice price, the dealer is not selling to you at zero net profit.
In the internet era, you can find invoice price pretty easy. Which does help you in negotiating. Just remember the dealer is paying less than invoice price when a car sale is all done.