UPDATE: Kevin Magnussen has since stated that his deal runs until the end of 2020.
Grosjean has been with Haas since its first season in 2016 while Magnussen joined a year later.
“From the very beginning, we needed experienced drivers to hasten the development of our car and our team, and we have two very good and experienced drivers in Romain Grosjean and Kevin Magnussen,” said team principal Guenther Steiner.
“We've improved drastically from last year to this year, so retaining both drivers was a pretty easy decision.”
Magnussen is currently best placed of the pair in ninth in the championship on 49 points.
“I've never been in a better situation than the one I'm in here at Haas F1 Team,” said the Dane.
“This is a team filled with racers and we're all striving for the same thing.
“There's no bureaucracy and everything is very straightforward. Gene Haas is all about efficiency, and he and Guenther Steiner have created a very efficient environment that gets the best from its people.
“We all believe in each other and that's why we've achieved as much as we have.”
Grosjean's tenure had been less certain after a crash-marred start to 2018 but he has rallied in recent times.
The Frenchman is now 14th in the standings on 27 points after four top 10 finishes in the last seven races and a disqualification from sixth for a floor infringement at Monza during that span (subject to appeal, to be heard in November).
Haas is fifth in the constructors' race, 15 points behind Renault.
“It's impressive to see what this team has accomplished in such a relatively short time, and for someone who has been here since the very beginning, I take a lot of pride in the time, effort and sacrifice we've all put forth to make Haas F1 Team so competitive,” said Grosjean.
“I'm very happy to continue with Haas F1 Team and represent Haas Automation and all of our partners.
“Gene Haas has built something very special – something we can make even better – and it's an honour to be a part of it.”
The Russian Grand Prix takes place this weekend.