So you and your partner have tried everything. You've seen a marriage counselor. You've done primal-scream therapy. And still you hate each other's guts.

No problem. There's nothing wrong with breaking up--so long as you have a buy-sell agreement in place before you start considering it.

When constructing a partnership agreement, experts say, nothing, nothing, nothing is more important (or more frequently overlooked) than a mechanism for ending the partnership--a way to extricate your partner, or yourself, from your company at a fair price. "It's kind of like your roll bar," explains Fort Worth management consultant Sam Lane. "You hope you never have to use it, but you want it in there." Several commonly used techniques have evolved for the purpose of determining who stays, who goes, and how much money changes hands, each approach designed to prevent one partner from gouging or lowballing the other:

Put Up or Shut Up (also known as Shotgun). One partner names a valuation for the company as a whole, and the other must either buy or sell the company at that valuation. Tends to be an effective mechanism for keeping both parties honest, except when one partner is significantly wealthier than the other.

The Price Is Right. Used when it's clear who's the buyer and who's the seller and the sticking point is the price. Each partner hires an appraiser to value the business. Then a third, independent appraiser is hired. Whichever of the two appraisals is closest to the independent appraisal (as long as it's within 20%) becomes the selling price.

The Spinning Shotgun. One partner submits a bid. The other partner must sell at that price--or else submit a counteroffer that's at least 5% higher.

Determining the price isn't the only issue a good buy-sell agreement should address, says Jonathan Karp, a lawyer at Reish & Luftman, in Los Angeles. The terms of financing may be equally important. In some states, companies can be forced to pay departing partners "fair value" for their ownership stakes within 90 days--a potentially bank-breaking requirement for small businesses. Working out an installment plan can ensure that the death of a partnership doesn't mean the death of a business, too.