Page 1 of 2

Pricing calculations

Posted: Mon Nov 04, 2019 12:56 pm
by svarre69
Hello everyone :)

I am trying to write a program for calculating Selling Price (PRC) Cost (CST) Margin (MAR) and Markup (MU)

MU is defined as the difference between PRC and CST, divided by CST.

MAR is defined as the difference between PRC and CST, divided by PRC.

That is: Markup is based on Cost and Margin is based on Selling Price.

I have created the menu for the program using MVAR and VARMENU, and I have programmed finding PRC and MU
given CST and MAR.

I would like the program to find the two remaining variables, given two variables.
Eg. if we have PRC and MAR given, the program finds CST and MU.

Below are the formulas listed for finding the remaining two.

I guess I need some kind of test to find out which variables are filled in when I run the program.
Any suggestions on how to do this?

Calculate Selling Price given Cost and Markup:
CST, ENTER, MU, % +.

Calculate Selling Price given Cost and Margin:
CST, ENTER 1 ENTER, MAR, % - /(division).

Calculate Cost given Selling Price and Markup:
PRC, ENTER 1 ENTER, MU % + /.

Calculate Cost given Selling Price and Margin:
PRC ENTER, MAR, % -.

Calculate Markup given Cost and Selling Price:
CST, ENTER, PRC, %CHG.

Calculate Markup given Margin:
MAR, ENTER, ENTER, 1, X exchange Y, % - /.

Calculate Margin given Selling Price and Cost:
PRC, ENTER, CST, %CHG, CHS

Calculate Margin given Markup:
MU, ENTER, ENTER, 1, X exchange Y, % + /.

Below you find the program listing I already have.

The program can also be used for finding out how much an item cost with or without tax. If an item costs $160 without tax,
set the Cost = 160 and set the Margin = 20 then Markup will show the tax (25%) and PRC = $200 which is the Price including tax.
And vice versa.

Code: Select all

01 LBL "SALES"
02 MVAR "PRC"
03 MVAR "CST"
04 MVAR "MAR"
05 MVAR "MU"
06 VARMENU "SALES"
07 STOP
08 EXITALL
09 RCL "CST"
10 1
11 ENTER
12 RCL "MAR"
13 %
14 -
15 /
16 STO "PRC"
17 RCL "MAR"
18 ENTER
19 ENTER
20 1
21 X exchange Y
22 %
23 -
24 /
25 STO "MU"
26 END

Re: Pricing calculations

Posted: Mon Nov 04, 2019 3:26 pm
by Epidiah
A quick and dirty solution to this is to use two smaller programs in the Solver.

This...

Code: Select all

00 { 37-Byte Prgm }
01▸LBL "*MU"
02 MVAR "PRC"
03 MVAR "CST"
04 MVAR "MU"
05 RCL "CST"
06 RCL "MU"
07 %
08 +
09 RCL- "PRC"
10 END
And this...

Code: Select all

00 { 40-Byte Prgm }
01▸LBL "*MAR"
02 MVAR "PRC"
03 MVAR "CST"
04 MVAR "MAR"
05 RCL "PRC"
06 RCL "MAR"
07 %
08 -
09 RCL- "CST"
10 END
From the Solver menu, choose the program named after the variable you want involved in your calculations (MAR or MU). This is either the variable you're trying to solve for, or the variable you know if you're trying to solve for either PRC or CST.

Once you've solved one of these equations, the values remain in the variables. So you can exit back to the program selection part of the Solver menu and choose a different program to solve for the remaining variable.

Let's say you don't care about PRC or CST, but want to know the MAR given a MU of 25%. Here's how you could do it:
  • Shift 7 to enter the Solver Menu
  • [*MU] to select the MU program
  • 25 [MU] to put 25 in the MU variable
  • 1 [PRC] (the number and choice of variable really doesn't matter here, as long as you put a value in one & solve for the other)
  • [CST] to solve for CST so that both PRC and CST will be available in the next program
  • [Exit] to return to the main Solver Menu where you can...
  • [*MAR] ...select the MAR program
  • [MAR] To choose MAR as the variable you wish to solve for (you'll probably have to select this a couple times because the first time you do the calculator will assume you're entering a guess into the variable)
Hopefully that's helpful.

Re: Pricing calculations

Posted: Tue Nov 05, 2019 9:28 am
by svarre69
This is great stuff!! :)

Using the Solver is very efficient - thank you.

Kind regards
Peter. :)

Re: Pricing calculations

Posted: Tue Nov 05, 2019 11:42 pm
by rprosperi
svarre69 wrote:
Mon Nov 04, 2019 12:56 pm
Hello everyone :)

I am trying to write a program for calculating Selling Price (PRC) Cost (CST) Margin (MAR) and Markup (MU)

[snip]

The program can also be used for finding out how much an item cost with or without tax. If an item costs $160 without tax,
set the Cost = 160 and set the Margin = 20 then Markup will show the tax (25%) and PRC = $200 which is the Price including tax.
And vice versa.
Do you really mean"tax" here? The program works with margins, markups, price, etc, in the standard business methods, but then you suddenly introduce "tax". Are you suggesting to use Margin to calculate tax? If so, your example says to use 20% Margin to get the effective tax increase of 25%, but a typical user likely would not know what Margin to enter to get the effective tax rate they want. Maybe I'm missing something?

Re: Pricing calculations

Posted: Wed Nov 06, 2019 9:40 am
by svarre69
Hello Bob

In Denmark the tax is 25% - so using the margin as 20% to calculate tax is ok for this purpose.
Not generally of course - you are absolutely right in that point. :?

Sorry for confusing you.

With kind regards
Peter

Re: Pricing calculations

Posted: Wed Nov 06, 2019 3:49 pm
by rprosperi
Thanks for clarifying, I thought I was missing something... lol.

Wow, 25% Tax ?! I thought 8.125% where I live in NY was pretty high, holy smokes!

Re: Pricing calculations

Posted: Wed Nov 06, 2019 10:01 pm
by Walter
rprosperi wrote:
Wed Nov 06, 2019 3:49 pm
Wow, 25% Tax ?! I thought 8.125% where I live in NY was pretty high, holy smokes!
FYI, German VAT is 19%.

Re: Pricing calculations

Posted: Wed Nov 06, 2019 10:18 pm
by cdmackay
20% in the UK (standard rate)

Re: Pricing calculations

Posted: Thu Nov 07, 2019 8:41 pm
by DA74254
25% in Norway and Sweden.
21% in Latvia

Though, Norway and Denmark is "funny" when it comes to cars. Import tax on a car in Norway is an average of 100%. With a little less, ca 50% on smaller cars and up to 1000 (one thousand)% on cars like Bugatti and such. It's even worse in Denmark with 125 - 200% import tax on cars.
Though Electric cars ar subsidised in Norway; absolutely zero/zilch/none tax or fees on the dildo fuel cars, as the chlorophyll mafia in Norway have the insanely stupid idea that an electric car does not pollute..

Re: Pricing calculations

Posted: Fri Nov 08, 2019 7:50 pm
by keithdalby
DA74254 wrote:
Thu Nov 07, 2019 8:41 pm
dildo fuel cars.
Well that's a fuel I've not heard before