When investing for the long term, quality tends to stand out.
Businesses with strong competitive advantages, consistent earnings, and the ability to reinvest for growth are often the ones that deliver the best returns over time.
While short-term market movements can be unpredictable, high-quality companies can continue compounding over many years.
Here are two ASX shares that could be worth buying and holding for the next decade.

Image source: Getty Images
REA Group Ltd (ASX: REA)
The first ASX share that fits the definition of quality is REA Group.
It operates Australia's leading online property marketplace and has built a dominant position that is difficult for competitors to challenge. Its platform is deeply embedded in the real estate industry, making it the go-to destination for buyers, sellers, and agents.
This dominance gives REA Group significant pricing power. Even in softer property markets, the company has historically been able to grow revenue through premium listings and value-added services.
Over time, its digital platform has continued to evolve, with additional tools and data services enhancing its offering.
With a strong market position, high margins, and exposure to long-term housing activity, REA Group appears well placed to continue delivering growth over the next 10 years.
Bell Potter recently put a buy rating and $211.00 price target on its shares. Based on its current share price of $153.78, this implies potential upside of 37% for investors.
TechnologyOne Ltd (ASX: TNE)
Another ASX share that could be a strong long-term investment is TechnologyOne.
It is an enterprise software company that provides solutions to government agencies, universities, and large organisations. Its transition to a cloud-based software-as-a-service model has transformed the business, leading to more predictable and annual recurring revenue (ARR).
One of TechnologyOne's key strengths is the stickiness of its customer relationships. Once its software is embedded into an organisation's operations, switching providers can be costly and complex.
This creates a high level of customer retention and supports long-term revenue growth.
The company also has a growing international presence, particularly in the United Kingdom, which could provide an additional growth runway over time.
With strong margins, recurring revenue, and a scalable platform, TechnologyOne has the characteristics of a business that could continue compounding over the next decade.
Morgan Stanley is one of a number of brokers that is bullish on TechnologyOne. It has an overweight rating and $34.00 price target on its shares. Based on its current share price of $27.43, this suggests that upside of 24% is possible between now and this time next year.