"Extinct" is too shallow of a term in terms of the possibilities of what can happen in the future. This is under the assumption that something outside of our control will wipe us out.
1) Humans will exhaust all resources and destroy the environment, this is inevitable regardless of efforts to convert to "Green" energy. This is because it is population that is the problem, meaning things will inevitably become unsustainable no matter how efficient we are due to lack of physical space, even after we wipe out all other species on earth. So by the will of nature, humans will die en mass via starvation and war. But this won't kill off humans, some will survive in the shadow of the fall for many years to come. Possibly, evolving into something else along the way.
2) Humans somehow overcome our animalistic nature, and able to live in harmony with nature. Most likely by then though, humans will have evolved into something else (technically not human, therefor extinct). The same applies in a dystopian society as well. If we can choose our genetics, then eventually "humans" as we know them, will become extinct. Also very possible humans can take multiple evolution paths and co-exist as well, much like ants do. As to live in super-societies like we do, we eventually might lose our social instincts or emotions and become a hive mind and new species all together.