(CNN) YouTube star MrBeast wanted to do something big to celebrate reaching 20 million subscribers, so his fans challenged him to plant 20 million trees.

He's raised more than $8.2 million in just a few days with donations from Elon Musk, Twitter CEO Jack Dorsey and his legion of fans.

He and fellow YouTuber Mark Rober have partnered with the Arbor Day Foundation to raise the money and get the trees in the ground.

More than 300,000 people have made donations since the TeamTrees campaign launched on Friday afternoon, Arbor Day Foundation spokesman Danny Cohn told CNN.

Elon Musk, of Tesla and SpaceX fame, gave $1 million dollars and even changed his Twitter name to "Treelon."

Ok, sounds legit, will donate 1M trees — Treelon (@elonmusk) October 29, 2019

Dorsey gave $150,000, Norwegian DJ and record producer Alan Walker gave $100,001 and MrBeast gave $100,002 to his own cause.

"The average person can't afford $150,000 or a million, but we've been getting spikes of between 5 and 20 trees every time a large donation comes in and every tree matters, every single donor is important," Cohn said.

The Arbor Day Foundation will work with its local partners around the world to plant one tree for each dollar they raise.

It will take time to get the right trees to the right places -- and dig 20 million holes -- but Cohn said they expect to have all the trees planted by 2022 , which is its 150th anniversary.

"We really want to make sure they are being placed where they can do the most good for the Earth," he said.

Cohn said that the big celebrity donations have inspired young people to give at a rate that they've never seen before. "This is just another fact of this generation seeing the importance of getting trees in the ground to help the future of the earth," he said.

Every tree matters! I know I've been posting all the big donations but the small ones are just as important! WE WILL HIT 20,000,000! :)) pic.twitter.com/D72cg1qaxn — MrBeast (@MrBeastYT) October 30, 2019