BBC Trust chairman Rona Fairhead wrote to the Welsh-language channel's authority chairman Huw Jones to confirm the arrangement on Wednesday.
S4C's current agreement runs to March 2017.
The trust had previously pledged to continue this year's level of funding to 2018.
In the letter, Ms Fairhead said it was "the right thing to do" in recognition of the "important role played by S4C for Welsh-speaking licence-fee payers".
Welsh Secretary Alun Cairns said he was delighted S4C's funding has been protected.
"Many organisations have worked hard to help secure this settlement, which will safeguard S4C's future for many years to come," he added.
"S4C plays an important role in Wales, cementing the Welsh language and culture within communities, and I will continue to do everything I can to ensure the channel's continued success."

The International Amateur Boxing Association (AIBA) is introducing a pro tournament in 2013 and claims fighters who appear will be eligible for Rio.
And an IOC spokesman told BBC Sport: "We are currently discussing the project with them [AIBA].
"The IOC encourages the participation of the best athletes at the Olympics."
Last year, AIBA introduced its World Series of Boxing (WSB), a hybrid of the two boxing codes which allows salaried 'amateurs' to retain their Olympic eligibility, even though the tournament features no head guards or vests and professional-style scoring with three judges.
WSB was seen as a bridge between Olympic and full-blown professional boxing and AIBA president Wu Ching-Kuo regards AIBA Professional Boxing (APB) as the logical next step.
If I was a professional governing body, I would be saying 'hang on a minute, what right do they have to do this?' Why is the APB's professional standard different to ours?'
"I feel this move towards professionalism is very important for AIBA," said Wu last week.
"Boxers have always felt that they have instantly had to turn professional after competing at the Olympics. We want to change that culture, show there is another way and this is now [the] time for the sport to move forward.
"I hope we can attract the very best professionals out there. I don't know definitely if they will compete in AIBA Professional Boxing but I am hopeful they will because the Olympics is something very special and there is no greater prize in sport than the Olympic gold medal."
A spokesperson for the Amateur Boxing Association of England (ABAE) said: "The announcement by AIBA represents another step in attempting to provide a duty of care and support to boxers throughout the whole of their careers.
"The welfare of boxers is our number one priority and we would expect everyone connected with the sport to support this principle.
"Like all major changes it creates a number of significant challenges for us as an organisation and we are forming a commission to examine the proposals in more detail in our role as the governing body for amateur boxing in England. We will provide a further update after the commission has arrived at its initial conclusions."
However, another source within amateur boxing told BBC Sport the AIBA's plans have caused "shock and dismay" among the ranks.
"What does this [the possibility of professional boxers competing in the Olympics] mean for amateur boxing?" said the source.
"There are a whole series of knock-on issues. At the moment the rules of the amateur boxing associations of England, Scotland and Wales prohibit any professional linkages whatsoever, so even the articles of the associations will need to be examined for this to become possible in England.
"And if I was a professional governing body, I would be saying 'hang on a minute, what right do they have to do this?' Why is your [the APB's] professional standard different to ours?'"
Funding for S4C will remain at its current level of £74.5m a year until the end of the current licence fee agreement in 2022.
[NEXT_CONCEPT]
Professional boxers could compete at the 2016 Olympics in Rio after the International Olympic Committee (IOC) refused to rule out the possibility.