Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This is the equation that I use to calculate a percentage margin between cost and sales prices, where x = sales price and y = cost price:

\begin{equation} z=\frac{x-y}{x}*100 \end{equation}

This can be solved for x to give the following equation, which calculates sales price based on cost price and margin percentage:

\begin{equation} x=\frac{y}{1-(\frac{z}{100})} \end{equation}

My question is, what are the steps involved in solving the first equation for x? It's been 11 years since I last did algebra at school and I can can't seem to figure it out.

I'm guessing the first step is to divide both sides by 100 like so:

\begin{equation} \frac{z}{100}=\frac{x-y}{x} \end{equation}

Then what? Do I multiply both sides by x? If so how to I reduce the equation down to a single x?

share|improve this question
2  
I think your problem is you don't remember that $\frac{a+b}{c} = \frac{a}{c} + \frac{b}{c}$. You can use that on $\frac{x-y}{x}$ and you'll find $\frac{x}{x}-\frac{y}{x}$. Unless $x=0$ this simplifies to $1 - \frac{y}{x}$. (In fact, it does too when $x=0$, then both equations are simply not defined. But you shouldn't worry about that too much.) –  Myself Feb 17 '11 at 21:40
add comment

2 Answers

up vote 7 down vote accepted

First, clear the denominator by multiplying both sides by $x$: \begin{align*} z &= \frac{100(x-y)}{x}\\ zx &= 100(x-y) \end{align*} Then move all the terms that have an $x$ in it to one side of the equation, all other terms to the other side, and factor out the $x$: \begin{align*} zx &= 100x - 100y\\ zx - 100x &= -100y\\ x(z-100) &= -100y \end{align*} Now divide through by $z-100$ to solve for $x$; you have to worry about dividing by $0$, but in order for $z-100$ to be $0$, you need $z=100$; the only way for $z$ to be equal to $100$ is if $\frac{x-y}{x}=1$, that is, if $x-y=x$, that is, if $y=0$. Since, presumably, you don't get the things for free, you can assume that $y\neq 0$ so this division is valid. You get: $$x = \frac{-100y}{z-100}.$$ Now, to get it into nicer form, use the minus sign in the numerator to change the denominator from $z-100$ to $100-z$. Then divide both the numerator and the denominator by $100$ to get it into the form you have: \begin{align*} x & = \frac{-100y}{z-100}\\ x &= \frac{100y}{100-z}\\ x &= \frac{\frac{1}{100}\left(100 y\right)}{\frac{1}{100}(100-z)}\\ x &= \frac{y}{1 - \frac{z}{100}}. \end{align*}

Added: Alternatively, following Myself's very good point, you can go "unsimplify" $\frac{x-y}{x}$ to $1 - \frac{y}{x}$, to go from $$\frac{z}{100} = \frac{x-y}{x} = 1 - \frac{y}{x}$$ to $$\frac{y}{x} = 1 - \frac{z}{100}.$$ Taking reciprocals and multiplying through by $y$ gives \begin{align*} \frac{x}{y} = \frac{1}{1 - \frac{z}{100}}\\ x = \frac{y}{1-\frac{z}{100}} \end{align*} which is probably how the particular expression you had (as opposed to $\frac{100y}{100-z}$) arose in the first place.

share|improve this answer
    
Great answer, really well explained thanks! –  Adam J. Forster Feb 18 '11 at 9:33
add comment

$$ z = 100 \cdot \frac{x-y}{x}$$

$$ zx = 100(x-y)$$

$$zx - 100x = -100y$$

$$x(z-100) = -100y$$

$$x = -\frac{100y}{z-100}$$

Then divide both numerator and denominator by $-100$ to get $$x = \frac{y}{1-(\frac{z}{100})}$$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.