Trying to re-arrange a formula

42markf

New member
Joined
Mar 7, 2021
Messages
4
Hi,
I'm trying to rearrange a formula, and its so long since I did any algebra at school, I can't remember how to do it.

Backstory:
The formula is to work out the fees charged on a trading website.
The fees are charged on top of the cost of a trade. So you always end up with very strange numbers so you get lots of odd pence/cents in your account. I like round numbers, so I like to enter my trades in such a way that the trade + fee = a round number.
This means I have to work out my trades by experimentation, by typing in numbers (usually with lots of decimal places), and slowly increasing or decreasing them to find the end result I want. So to make this easier, I want to use a little excel formula, so I can type in my desired result (the round number), and it will tell me what I need to enter on the website, which I can copy/paste into the box. I worked out an approximate version, which worked on small numbers, but drifted when the numbers get bigger, so I'm trying to do it properly.
I have managed to work out the formula that is used to calculate the fee, I just can't figure out how to rearrange it to get the subject I want in the right place.

The Question:
I want to rearrange the following formula, to make X the subject. I know all the other values.
The formula is:
AX - D(AX) = B

And just incase I have got my BODMAS wrong, here it is with some extra brackets, just to add extra clarity:
(AX) - (D(AX)) = B

Thanks for any help you can give.
If you can show working then even better. I would have been able to do this myself many years ago, but I just can't remember, so would gladly take the refresher course!
 
Hi,
I'm trying to rearrange a formula, and its so long since I did any algebra at school, I can't remember how to do it.

Backstory:
The formula is to work out the fees charged on a trading website.
The fees are charged on top of the cost of a trade. So you always end up with very strange numbers so you get lots of odd pence/cents in your account. I like round numbers, so I like to enter my trades in such a way that the trade + fee = a round number.
This means I have to work out my trades by experimentation, by typing in numbers (usually with lots of decimal places), and slowly increasing or decreasing them to find the end result I want. So to make this easier, I want to use a little excel formula, so I can type in my desired result (the round number), and it will tell me what I need to enter on the website, which I can copy/paste into the box. I worked out an approximate version, which worked on small numbers, but drifted when the numbers get bigger, so I'm trying to do it properly.
I have managed to work out the formula that is used to calculate the fee, I just can't figure out how to rearrange it to get the subject I want in the right place.

The Question:
I want to rearrange the following formula, to make X the subject. I know all the other values.
The formula is:
AX - D(AX) = B

And just incase I have got my BODMAS wrong, here it is with some extra brackets, just to add extra clarity:
(AX) - (D(AX)) = B

Thanks for any help you can give.
If you can show working then even better. I would have been able to do this myself many years ago, but I just can't remember, so would gladly take the refresher course!
What is A - number or matrix?

What is D - number or matrix?
 
I'm not entirely sure what a matrix is but I think they are all numbers.
In this particular case, the scenario is when I am selling off some shares, but not the entirety of the amount owned. So I want the sold amount after the fee to be a nice round number.
I'll just explain what the letters are so that helps:


A = Share price
D = Fee %. But if for example this is 1%, obviously in Excel I can either enter 1% or 0.01
X = Quantity of shares to be sold
B = Final price, which is the income generated from the sale, minus the fee.

Thanks
 
I'm not entirely sure what a matrix is but I think they are all numbers.
In this particular case, the scenario is when I am selling off some shares, but not the entirety of the amount owned. So I want the sold amount after the fee to be a nice round number.
I'll just explain what the letters are so that helps:


A = Share price
D = Fee %. But if for example this is 1%, obviously in Excel I can either enter 1% or 0.01
X = Quantity of shares to be sold
B = Final price, which is the income generated from the sale, minus the fee.

Thanks
So then:

(AX) - (D(AX)) = B

X * [A - D * A] = B

\(\displaystyle X \ =\ \frac{B}{A * (1 - D)}\)
 
Thats great thanks.
I think it was the (1-D) that I just couldn't get. I was getting to X= B over something, but couldn't put that last bit together. 1-D seems very obvious now, but I couldn't figure it out!
Thankyou.
 
Thats great thanks. I think it was the (1-D) that I just couldn't get. I was getting to X= B over something, but couldn't put that last bit together. 1-D seems very obvious now, but I couldn't figure it out! Thankyou.
Do you understand now - why/how that [1-D] term was brought in.
 
It feels logical though now you ask I'm struggling to actually explain it.
Because D is a %, its always going to be a value between 0 and 1. So by changing it to 1-D you are working out the "remaining" %. And then multiplying that to find the portion of A that is left.
Is that it?
 
Top