There are very few things that Democratic and Republican presidential nominees Hillary Clinton and Donald Trump can agree upon. From taxes to immigration to trade deals, the candidates’ positions are rarely in agreement. One policy that both candidates support, however, is mandated paid maternity leave.

Trump proposes to mandate six weeks of paid leave for women who do not receive such a benefit from their employers. Clinton’s plan would grant 12 weeks of paid leave to new moms. The candidates suggest that their plans would not cost businesses money, claiming their programs would be financed either by “eliminating fraud” in unemployment insurance (Trump) or having the wealthy “pay their fair share” (Clinton).

What these candidates fail to realize, however, is that their policies, no matter how well-intentioned, would create difficulty for businesses and ultimately harm the very groups the candidates intend to help — women and families.

Suppose that either the Clinton or Trump plan were enacted and that taxpayers would pay the women’s wages. This would not mean that employers would bear no costs. They would still have to pay for medical insurance and cover for the missing employees either by finding someone new (incurring search and training costs, etc.) or pay overtime to existing workers.

These costs aren’t trivial. When even large companies like Walmart operate on a mere 3 percent profit margin, even a slight increase in labor costs can make a big difference.

Even with this information, many people would still support such a policy, as it appears to benefit women and families. But, again, this simply isn’t the case because in the face of mandated leave, women would be less likely to be hired and those who were hired would earn less than men.

Understanding why is a lesson in economics 101.

Suppose an employer is looking for a new worker. One candidate is male; the other is female. Both are in their late 20s and have equal qualifications in every respect, or perhaps the female is slightly more qualified. With mandated leave she’s less likely to be hired. Why?

Because hiring her would be more expensive. Her prospective employer, looking at her age, could reasonably expect her to have a child in the next few years. That means he would have to pay for her insurance while she’s on leave and pay someone to cover for her absence. So the employer would hire the man or pay the woman less, not because he hates women or families but because he’s trying to run a business. Note that this creates a problem for all younger women in the labor force. Regardless of a particular woman’s family plans, women as a group would be more expensive to hire.

Politicians and others typically point to Nordic countries as icons of maternity policy and as a counterargument to my case against it. It’s often noted that these countries are wealthy, have generous paid-leave policies, and are more likely to return to the labor force after having a baby. In Norway, for example, a woman can receive 36 to 46 weeks of paid leave after the birth or adoption of a baby. In Denmark mothers can take off a full year with pay.

What these statistics leave out, however, is that women in these countries are much less likely than American women to achieve their career goals. Long leave often weakens individuals’ professional networks and causes many women to experience what economists call “human capital depreciation,” which means their skills get rusty. This is bad news when it comes time to ask for a raise or promotion. In contrast, women in the United States are much more likely to earn wages closer to their male counterparts and hold managerial and executive positions.

Instead of coercing employers into giving a set amount of leave, how about allowing women and men to engage in contractual alternatives? Let’s encourage individuals to negotiate parental leave as they would salary or any other benefits.

This would allow for women who intend to have children to obtain time off without harming women as a whole.

It’s not often that candidates agree on a policy. Unfortunately for women, both candidates are wrong on mandated leave.