Their new contracts coincide with the duration of Mercedes' own current commitment to F1.
In common with the rest of the teams, Mercedes will begin negotiations for beyond 2020 with new owner Liberty Media during this year.
Wolff retains his 30% shareholding in the team and Lauda his 10% stake.
Team boss Wolff joined Mercedes from Williams in February 2013, and Lauda took up his position in late 2012.
The deals conclude a busy winter of off-track activity for Mercedes, who have dominated the sport since the advent of turbo hybrid engines in 2014 with three consecutive world title doubles.
Mercedes have signed Valtteri Bottas as Lewis Hamilton's team-mate this season, with the Finn replacing world champion Nico Rosberg, who announced his retirement five days after winning the title last November.
Executive director (technical) Paddy Lowe is on gardening leave before his departure from Mercedes and is to join Williams in the coming weeks.
Lowe's position as technical boss has been taken by James Allison, who has been given the title technical director, a new role within the team as part of a slight re-alignment of responsibility at the head of the company.
Wolff has run the team with Lowe as his right-hand man since the departure of former team principal Ross Brawn at the end of 2013.
Dieter Zetsche, the chairman and chief executive officer of Mercedes' parent company Daimler, said: "In 2013, we restructured the management of the team with the clear goal of improving our performance.
"Since then, however, the results have exceeded our expectations. A key factor in this success has been the combination of Toto's entrepreneurial skills and Niki's experience.
"Their renewed commitment gives our programme important continuity for the next four years."
F1 has introduced major regulation changes for this season in an attempt to make the cars faster and more dramatic - and to give the sport greater appeal.
The cars are wider with bigger tyres and are expected to be between three and five seconds a lap faster than in 2016.
Mercedes' new F1 car will be revealed to the public on Thursday, before the start of pre-season testing three days later.
The first 2017 car to be unveiled will be that of Swiss team Sauber on Monday, followed by the Renault on Tuesday, Force India on Wednesday and Ferrari, McLaren and Williams on Friday.
Mercedes Formula 1 boss Toto Wolff and non-executive chairman Niki Lauda have signed new deals to stay with the team until the end of 2020.