I am trying to implement this formula using a spreadsheet (currently Libre Calc) but any mathematical advice will be gratefully accepted.
Let's say, as an example, there are two teams with the following decimal odds to win. Team A = 2.5 Team B = 3.0
Now for those unfamiliar with decimal odds, taking team A as an example, a bet of 1 pound would give a return of 2.5 pounds, but this includes the stake so the actual profit is only 1.5 pounds.
Now, I can by trial and error work out that if I bet 3 pounds on team A @ 2.5 I will get a return of 7.5 pounds, and if I bet 2.5 pounds on team B @ 3.0, I will also get 7.5 pounds.
This gives me a profit (after deducting the stake) of 4.5 pounds or 5 pounds respectively.
Then, since only one team can win I would make an actual profit of -
Team A - 2 pounds (7.50 return minus original stake 3.0 minus team B stake 2.5) Team B - 2 pounds (7.50 return minus original stake 2.5 minus team A stake 3.0 pounds)
Is there any formula to allow me to specify Team A odds, Team B odds, and net profit required (in this example 2 pounds) and see the total amount to bet that when applied pro-rata, would give the same profit whichever team wins.
In the above example I would enter Team A = 2.5, Team B = 3.0, and Profit required = 2 pounds, the result would be 5.5 pounds (to be pro rated @ 3 pounds and 2.5 pounds respectively based on the odds).
I thank you all in advance and accept that this may not be possible, I am also aware that a match could result in a draw but I am not concerned with this at present.
EDITED TO CORRECT A MISTAKE, NOW IT MAKES SENSE
This is a nice question. You would expect that in real life this is not possible, since otherwise everybody would do it all the time. At the same time your example shows that it can be done some of the time, so apparently it depends on the odds. We'll come back to that at the end.
Suppose some-one offers $A$ odds for bets that team A wins and $B$ odds that team B wins. Following your example we first see what happens if we bet $B$ dollars on team A and $A$ dollars on team B.
As in your example we get in return $AB$ dollars if team A wins and $BA = AB$ dollars (i.e. the same amount) if B wins. We payed $A + B$ dollars so our net profit in this scenario is:
$AB - (A + B)$
Now the symmetry, the fact that it doesn't matter who wins as long as someone wins, comes from betting $A$ dollars on B and $B$ dollars on A, but this is preserved if we multiply both numbers with some factor $x$:
If we bet $Ax$ dollars on team B and $Bx$ dollars on team A we get, in either scenario $ABx$ dollars after paying $Ax + Bx$ dollars and so our net profit is
$$ABx - (Ax + Bx) = (AB - A - B)x$$
So if we want this net profit to be some given number $P$, we want to solve the equation:
$$(AB - A - B)x = P.$$
The solution to this is:
$$x = \frac{P}{AB - A - B}$$
Note that $A$ (odds of A), $B$ (odds of B) and $P$ (desired profit) are known, only $x$ needs to be computed, and above formula does.
Once you have found $x$ you can place your bets: put $xA$ dollar on team B and $xB$ dollar on team A.
Numerical example:
suppose someone offers odds of $A = 8$ for team A and odds of $B = 3$ for team B. You want to make $P = 520$ dollars profit
Step 1: compute $x = \frac{P}{AB - A - B} = 520/(24 - 8 - 3) = 40$.
Step 2: bet $Ax = 8*40 = 320$ dollars on team B and $Bx = 3*40 = 120$ dollars on team A. In total you are spending hence $440$ dollars.
If A wins we get $120A = 120*8 = 960$ dollars. Our net profit is $960 - 440 = 520$ as predicted.
If B wins we get $320B = 320*3 = 960$ dollars. Our net profit is $960 - 440 = 520$ as predicted.
Now where's the catch?
If $A$ and $B$ are really close to one, say $A = 1.10$ and $B = 1.20$ then $x$ turns out negative. In this example we have:
$$AB - A - B = -0.98$$
Which is smaller than $0$. Now if we take $P$ positive we get that $x$ is negative as well and so we should bet a negative amount on both teams in order to make a profit of $P$. But no-one would take this bet!
An alternative is to take $P$ negative as well, then $x$ becomes positive again and we can make the bets, but now we know we will be losing money. In fact we know exactly how much money we are gonna lose: we will 'win' the amount $P$ (which is was negative) and so lose the (positive) amount $|P|$.
So for odds close to one the formula will tell you how hopeless the situation is and for odds far away from one it will tell you how to get rich. Of course in both cases we are ignoring the option of a draw.