HONG KONG, April 25 (Reuters) - TikTok owner ByteDance would prefer shutting down its loss-making app rather than sell it if the Chinese company exhausts all legal options to fight legislation to ban the platform from app stores in the U.S., four sources said.

The algorithms TikTok relies on for its operations are deemed core to ByteDance overall operations, which would make a sale of the app with algorithms highly unlikely, said the sources close to the parent.

TikTok accounts for a small share of ByteDance's total revenues and daily active users, so the parent would rather have the app shut down in the U.S. in a worst case scenario than sell it to a potential American buyer, they said.

A shut-down would have limited impact on ByteDance's business while the company would not have to give up its core algorithm, said the sources, who declined to be named as they were not authorised to speak to the media.

It said late on Thursday in a statement posted on Toutiao, a media platform it owns, that it had no plan to sell TikTok, in response to an article by The Information saying ByteDance is exploring scenarios for selling TikTok's U.S. business without the algorithm that recommends videos to TikTok users.

In response to Reuters request for comment, a TikTok spokeswoman referred to ByteDance's statement posted on Toutiao.

TikTok's CEO Shou Zi Chew said on Wednesday the social media company expects to win a legal challenge to block legislation signed into law by President Joe Biden that he said would ban its popular short video app used by 170 million Americans.

The bill, passed overwhelmingly but the U.S. Senate on Tuesday, is driven by widespread worries among U.S. lawmakers that China could access Americans' data or use the app for surveillance.

Biden's signing sets a Jan. 19 deadline for a sale - one day before his term is poised to expire - but he could extend the deadline by three months if he determines privately-owned ByteDance is making progress.

ByteDance does not publicly disclose its financial performance or the financial details of any of its units. The company continues to make most of its money in China, mainly from its other apps such as Douyin, the Chinese equivalent of TikTok, separate sources have said.

The U.S. accounted for about 25% of TikTok overall revenues last year, said a separate source with direct knowledge.

ByteDance's 2023 revenues rose to nearly $120 billion in 2023 from $80 billion in 2022, said two of the four sources. TikTok's daily active users in the U.S. is also just about 5% of ByteDance's DAUs worldwide, said one of the sources.

ALGORITHMS NOT FOR SALE

TikTok shares the same core algorithms with ByteDance domestic apps like short video platform Douyin, three of the sources said. Its algorithms are considered better than ByteDance rivals such as Tencent and Xiaohongshu, said one of them.

It would be impossible to divest TikTok with its algorithms as their intellectual property licence is registered under ByteDance in China and thus difficult to disentangle from the parent company, said the source.

ByteDance also would not agree to sell one of its most valuable assets – its "secret source" - to rivals, said the four sources, referring to the TikTok algorithm.

In 2020, the Trump administration sought to ban TikTok and Chinese-owned WeChat but was blocked by the courts. The short-form video app has since faced partial and attempted bans in the United States and other countries.

China indicated it would be likely to reject a forced divestment of the TikTok app during a U.S. congressional hearing in March last year.

"China will firmly oppose it [the forced sale of Tiktok]," said a spokeswoman for the Ministry of Commerce at a news conference in Beijing in late March in 2023.

"The sale or divestiture of TikTok involves technology export and must go through administrative licensing procedures in accordance with Chinese laws and regulations."

China in 2020 unveiled the Export Control Law and the final text extended the definition of "controlled items" from prior drafts. According to state media, the amendment ensures that the exports of algorithms, source codes and similar data are subject to an approval process.

Excluding algorithms, TikTok's main assets include user data and product operations and management, said two of the people.

ByteDance, backed by Sequoia Capital, Susquehanna International Group, KKR & Co and General Atlantic among others, was valued at $268 billion in December when it offered to buy back around $5 billion worth of shares from investors, Reuters reported at the time. (Reporting by Kane Wu and Julie Zhu; additional reporting by Josh Ye in Hong Kong and Sheila Dang in Austin, Texas; Editing by Sumeet Chatterjee and Jane Merriman)