The "cost" of coal always excludes black lung disease, coal mine explosions and deaths, coal ash heaps that burst into nearby rivers, slag piles and the tons and tons of pollutants that go up into the air.  Natural gas requires no miners, emits very little pollution by comparison and results in no slag or coal ash piles.  THAT is why coal is shutting down around the world.  Yes, there still is a market for high quality coal used in smelting but power generation is now relegated to being a backup - a good backup and a necessary (for now) backup - but not day to day generation.  BTW, gas fired plants are much easier to shut down and bring back up for demand bumps - not coal.