American companies have a long history of weighing in on political and social issues. But the election of Donald Trump has fueled public pressure on businesses to go much further to take a stand on specific policies – and made it difficult for those that wish to remain neutral.

Trump’s recent decision to revoke a legal guidance that allowed transgender students to use bathrooms of their choice drew a round of protests from companies such as Yahoo and Apple. Before that, his actions on immigration, environment and women’s reproductive health – along with his propensity for tweet-attacking companies he doesn’t fancy – had already fanned intense public outrage that in turn has forced many businesses to publicly take sides.

“It’s rare for companies to be this publicly visible on an issue so early in a new administration,” said David Boaz, executive vice president of libertarian think tank Cato Institute.

So what’s the cost to businesses for taking sides – or failing to do so?

The most high profile fight so far involves the executive order that initially banned travelers, even those with valid visas and green cards, from seven Muslim-majority countries. More than 100 companies, including Google, Microsoft and Netflix, filed legal briefs supporting lawsuits to suspend the order. It’s not surprising that Silicon Valley would speak out against the ban, since many of its workers are immigrants.

While taking part in legal challenges may seem an expensive undertaking, it often costs far less than what some of the giant firms spend on lobbying, Boaz said. “If you’re Google or even Uber, $1m is not that much,” he added.

Some companies have been willing to spend money in other ways to express their political views. Google and Airbnb, for example, took out ads during Super Bowl to register their views on gay rights, immigration and religious tolerance. A 30-second spot at the Super Bowl this year cost around $5m.

For Uber, failing to take a strong stance against the travel ban initially was a costly mistake. The company faced a boycott campaign when it offered cheaper rides to JFK airport in New York City instead of joining other taxi drivers in a protest. Uber’s action prompted hundreds of thousands of people to delete their Uber app and upset its employees. In response, the company set up a $3m legal defense fund for its immigrant drivers, and its CEO, Travis Kalanick, stepped down from Trump’s economic advisory council.

Consumer boycotts have become a popular way to register political views, and that has been a challenge for companies that try to stay neutral. Nordstrom was caught in the midst of this when it became a target of a campaign, launched before the election, to boycott companies that do business with Trump family members. When it announced last month that it was dropping Ivanka Trump’s fashion label due to poor sales, it faced a tweet-lashing from the president and boycotts from his supporters.

“You don’t normally see supporters or detractors of a presidential candidate acting in such a mobilized block against companies,” said Brayden King, professor of management at Northwestern University’s Kellogg School of Management. “It reflects the highly polarized political environment we’re in right now, and people are seeing every part of their life as reflected through the mirror of politics.”

But the hubbub with Nordstrom hasn’t impacted the company much, Bloomberg reported. While sales of Ivanka’s line dropped 32% last year, as reported by the Wall Street Journal, the merchandise likely accounted for less than 1% of Nordstrom’s annual sales. Late last month, the company posted a quarterly profit that beat Wall Street’s expectation.

Staying neutral can be tough to accomplish for businesses these days. A 2014 study from public relations firm Global Strategy Group showed that 56% of Americans believe companies should stand up for what they believe in, regardless of whether the issue is controversial or not, compared to 44% in 2013.

Same-sex and transgender issues in particular have drawn strong reaction from the business community. Nearly 70 companies, including Ikea, Apple and General Electric, spoke out last year against state legislation in North Carolina that would force transgender people to use bathrooms that matched their gender at birth. In 2012, Nike, Microsoft and Starbucks announced their support of a Washington state bill to legalize same-sex unions. Dan Cathy, CEO of fast food chain Chick-fil-A, sparked both a “Chick-fil-A Appreciation Day” from one side and “National Same-Sex Kiss Day” from the other side when he made several statements against gay marriage.

The North Carolina law in particular prompted so many companies to suspend or cancel business deals that studies have emerged to try to calculate the financial toll. Research by the UCLA School of Law said the law would cost the state $5bn in economic activities per year. Last November, Forbes estimated that the state had experienced $630m in lost business since the state passed the law in March last year.

With Trump, businesses should brace themselves for further battles ahead, King said. The president’s environmental plans in particular are at odds with many large companies’ goals to cut carbon emissions and engage in broad scale conservation efforts, such as reducing water use and transitioning to renewable energy. Trump has vowed to eliminate environmental regulations, arguing that those rules are costly to companies.

Just this week, the EPA chief, Scott Pruitt, said carbon dioxide emissions are not causing global warming, a view that contradicts overwhelming scientific evidence.

“Environmental stewardship and sustainability are going to be big issues of contention,” said Irv Schenkler, clinical professor of management communication at New York University’s Stern School of Business. “Many large corporations have committed themselves to alternative energy, but the outlook is that the new administration is going to take a very different tack in this regard.”

Figuring out when to speak up and when to keep mum will continue to be a big challenge for companies in this divisive political climate, Schenkler said. Offending a thin-skinned president could jeopardize a company’s lobbying effort on other issues, such as corporate tax cut.

Trump’s tendency to hold a grudge and berate companies recalls the practice of former president Richard Nixon, who maintained a so-called “enemies list” that included business leaders such as Charles Dyson of Dyson-Kissner and Frank Heineman, president of Men’s Wear International. “He used the IRS and other government agencies to harass those that opposed him,” said West.

But keeping silent also hasn’t proven to be a good option for high profile companies.

“They have a duty to fight for the interest of their company,” King said. “Business should not be afraid of the government.”