Volkswagen (VLKAY)  said it plans to cut between 5,000 to 7,000 jobs by 2023 as the German carmaker shifts its focus to electric vehicles. 

The move also is aimed at cutting operating costs by about €5.9 billion ($6.6 billion). Volkswagen is expected to invest a total of $19 billion over the next five years to make electric vehicles, moving away from gas-powered engines in the wake of emissions scandals that have cost the the company $30 billion. 

The job cuts won't come strictly through firings. Much of them will be done through retirement offers, as 11,000 workers will be eligible for retirement by 2019. Meanwhile, part of the shift to cleaner vehicles will include about 2,000 added jobs in research and development. 

In a press release announcing the jobs and cost cuts, the company said, "The brand is taking important steps this year to strengthen competitiveness on a sustained basis. This includes the start of the electric offensive, efficiency measures in production and further progress in productivity and margins."

The company estimated the "automation of routine tasks will result in the loss of between 5,000 and 7,000 jobs by 2023. That can be absorbed by not recruiting replacements for employees who leave the company for retirement reasons." 

The stock was trading 0.92% higher in Frankfurt to €45.28 each. The stock's year to date gain is 4.6%.