Being tasked as the designated cake cutter is often a stressful job.

All eyes are on you to make sure each slice is cut to perfection, with judgment easily passed if one portion happens to be smaller than another.

Some may say there's a mathematically correct way to the art of cake cutting. Which apparently means, if you have been slicing cake in triangles your entire life, it's probably why you have been getting yelled for uneven slices.

A TikTok user has revealed the "right" way to cut a cake, with her video going viral after attracting more than half a million likes and thousands of comments from shocked users.

Under the handle @foodies, the American woman demonstrates her "trick" by using a three-layered chocolate cake.

"I hate to break it to you but you've been cutting cake wrong your entire life," she begins the video titled "How to cut your cake perfectly".

"Instead of slicing at an angle like you would do a pie, cut the cake in half first, then divide the halves in four equal sections."

She said the method allows the cake to be cut into eight even pieces from each side, instead of having to guess how big the wedges need to be using the "triangle" way.

"This trick has been used by wedding planners to get the most out of wedding cakes and has been proved by mathematicians as the right way to do it," she states.

One user described it as "life-changing", while others were left stunned by her technique.

"Most cut it like a pizza slice. I like this way. Actually I love it. Thanx," one man wrote.

However, not everyone agrees, pointing out that the frosting isn't evenly distributed on the slices.

"The real problem is the icing on that cake," one user wrote

"You are not getting the right distribution of icing that way."

Others slammed her mathematical theory, saying it's "incorrect".

"Hate to break it to you. I'm a mathematician and there's no equal parts there. I can cut it another way and maximise the amount of pieces," one user wrote.

"No. It should be triangles and not rectangles and no mathematician can argue about this," said another, while a third person added, "My brother is a mathematician and he doesn't approve this."

But, according to British writer and mathematician Alex Bellos, the American woman is correct – the triangular slice is not the "scientific" way to cut a cake.

However, he recommends a completely different approach, which helps keep any leftovers fresher for longer.

His version is based on a letter to the editor from Nature, a weekly science magazine, that dates back to December 1906.

In a YouTube video, Bellos, who follows the century-old notes and illustrations, cuts a round cake down the middle.

He then removes one long rectangular piece, which then forms two halves. He pushes the halves together before cutting another rectangular slice down the centre and repeating the actions until the entire cake is cut evenly.

Bellos' video has been viewed more than 16 million times since it was shared on YouTube in 2014.