Artificial intelligent assistant

Calculate percentage of total when this percentage is also part of the total I have some easy variables and 1 stinker involved in calculating the Final Price I can charge for an item. All costs (NOT the Base) are added to get the Total Price. In the example below, Var 3 is calculated from the resulting total but is also INCLUDED in the total. Example: Base Value: $10.00 (2 values are calculated from this number) + Var 1: 50% of Base: $ 5.00 + Var 2: 10% of Base: $ 1.00 + Fixed Cost: $ 4.00 (always fixed regardless of Base or total) = Subtotal ------ $10.00 + Var 3. 15% of Total $ ???? = TOTAL ------ $ ?????? ($10 + whatever Var 3 is) There are multiple Base Values so I need a formula that can work with different values. How can I calculate this without guessing and recalculating until I find the right value. Thanks!

Just use algebra

Total = Subtotal + .15 Total

So

.85 Total = Subtotal

Total = Subtotal/.85

Var 3 = .15 Subtotal/.85 = 3 Subtotal/17

Or more thoroughly....

Let $B = $ base cost.

Var 1 = $.5*B$

Var 2 = $.1*B$

Fixed Cost = $4$

SubTotal = Var 1 + Var 2 + Fixed Cost = $.5B + .1B + 4.00 = .6B + 4.00$.

Var 3 = $.15*$ Total=$.15 X$.

$X$ = Total = Subtotal + Var 3 = $.6B + 4.00 + .15X$

So $X = .6B + 4 + .15X$

$X - .15X = .6B +4 + .15X - .15X$

$.85 X = .6B + 4$

$.85 X/.85 = (.6B + 4)/.85$

$X = \frac {.6}{.85}B + \frac 4{.85} = \frac {60}{85}B + \frac {400}{85}=\frac {12}{17}B + 4\frac {12}{17}$.

Var 3 = $.15X = .15(\frac {60}{85}B + \frac {400}{85}) = \frac 9{85}B + \frac {12}{17}=\frac 3{17}(.6B + 4) = \frac 3{17}Subtotal$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f8b2c0c09f2af7fad6e7be90a9ab967e