The value of the solely and jointly held assets (including pensions) minus any liabilities form the net value of matrimonial property to be shared. When spouses were living together at some time in a tax year, assets can be transferred between them at any time in that tax year at no gain/no loss.
http://www.hmrc.gov.uk/helpsheets/hs281.pdf
However, there will be CGT liability for the years the property wasn't the main private residence and it should be factored into the equation.
Within reason you can agree between you to divide the assets how you wish, but you should be aware that splitting them in England & Wales 50:50 is an oversimplification of the law at this time. It only applies when (a) there are enough assets to meet the 'needs' of both parties and (b) there has been no exceptional contribution by one party to justify moving away from 50:50 as per the case of White v White [2001] When there aren't enough assets the checklist of factors in s25 Matrimonial Causes Act 1973 is referred to and usually needs comes at the top, or very near the top, of the list.