You can hire a professional appraiser or use a valuation formula to come up with a price using financial statements from one or more years. But the problem is that valuing a business at the time of sale usually results in co-owners seizing on different valuation formulas, which can produce very different results. For that reason, it helps for the owners to agree on a way to value the company in advance in a buy-sell or buyout agreement. This gives owners the chance to discuss and vote on how a reasonable price for the company should be calculated. The fact that a sound method was agreed to beforehand can go a long way to reducing conflict when the time for a buyout comes.
If you need legal advice for your business, talk to a lawyer.