Broadly, there are 3 main approaches for the split:
(a) a fixed split, either 50/50 or some other proportion
(b) take your deposit back (or if there is not enough equity, as much of it as you can) then split what's left according to a fixed ratio
(c) work out your total contributions and split the equity in proportion
(a) is simple and makes sense for couples who are paying pretty much equal shares, or have mingled finances like an SAHP and breadwinner,
(b) is what a lot of people are advocating but can result in a very unfair outcome if the house is not held for very long but has gone up or down significantly in that time.
(c) is the most complicated but the "fairest" in purely investment terms
My DSis went down route (b). She put in 60K deposit then they split costs and mortgage 50/50.
They lived together 3 years and the house went up 70K. They probably paid about 22K mortgage in that time. So she put in 71K and got back 95K, 34% return. Not bad!
But he put in 11K and got back 35K which is a 318% return!!! They both bought the same house somehow it worked out a much better investment for him than her, because he invested 11K but recieved return as if he'd invested 41K.
It wasn't deliberate; they both thought the fair thing to do was to get back her original deposit. The problem is that (1) that ignores the fact that she is forgoing returns she coudl get on that 60K if it wasn't being used as a deposit, and (2) the deposit meant they could buy a more expensive house and therefore got a bigger return.
If they'd taken approach (c), the split would have been 112K to her and 17K to him, which once we take out the initial investment is a profit of 41.5K to her and 6.4K to him, which works out as a 58.5% return for each person.
Because of this, When my husband (then BF) and I first bought we informally agreed if we did split up we'd do the proportional share model. Luckily he's very mathsy so although his first feeling was that the protected deposit model was most fair, once we ran a few scenarios he realised it wasn't.
By the time we got married 7 years later, our finanaces were so intermingled that we had no concerns we'd be moving into the 50/50 model.
I'm not advocating which is right for you her, but given how often model (b) is suggested I wanted to show how that can really work out badly for the person putting up the deposit.