The final televised draw on BBC One is expected to be broadcast on January 7, 2017.
Director of BBC content Charlotte Moore said: "This new deal reaffirms the BBC's commitment to The National Lottery and our ongoing relationship with Camelot.
"We both recognise the need to provide audiences with more ways to access the draw results across a range of platforms that reflect changing behaviour, while importantly retaining a home on BBC1 and continuing our support for the tremendous work they do through the Annual Awards show."
Camelot's digital director Tim Copper said: "We're delighted to have signed this contract extension, maintaining the strong relationship that has flourished between The National Lottery and the BBC since The National Lottery's launch 22 years ago.
"As consumer habits show an unrelenting shift towards digital platforms, we're embracing these changes in players' results-checking habits - providing content that they can access at all times, across multiple different touch-points.
"But it's also great that we can continue to provide a service to those loyal BBC One viewers who want their lottery results available at a regular time as they enjoy their favourite BBC shows. This new deal will allow us to do both."