Post Reply 
(HP-65) Markup - % of price and % of cost
01-18-2020, 02:05 AM (This post was last modified: 01-18-2020 07:45 PM by Dave Britten.)
Post: #1
(HP-65) Markup - % of price and % of cost
This program solves the price-cost-markup equation for any variable, and using either markup as % of price or markup as % of cost.

Recommended Key Labels

A: P
B: C
C: MU%
D: %P
E: %C

If you wish to follow the Finance Pac labeling convention, draw a box around P, C, and MU%, to represent variables that can be solved for.


Usage

Keys A, B, and C represent the variables in the equation: price, cost, and markup % respectively. To store a value, enter it into x and press the matching key. To solve for a variable, press the matching key with 0 in the x register.

To select % of price or % of cost mode, press either D or E respectively. The calculation mode is controlled by flag 1, with % of price represented by flag 1 cleared (the default state).


Examples

If a store is purchasing a product for $38 and selling it for $50, what is the markup over cost?

E (set % of cost mode)
38 B
50 A
C: 31.58%


A company purchases a finished good for $27 wholesale. They would like to make at least 24% margin on the sale of this good. What should the minimum selling price be?

D (set % of price/margin mode)
27 B
24 C
A: $35.53


Code:
LBL     23
A       11
STO 1   33 01
0       00
g x!=y  35 21
RTN     24
g NOP   35 01
1       01
RCL 3   34 03
EEX     43
2       02
/       81
f-1     32
TF 1    61
CHS     42
g NOP   35 01
+       61
f-1     32
TF 1    61
g       35
1/x     04
RCL 2   34 02
*       71
STO 1   33 01
RTN     24
LBL     23
B       12
STO 2   33 02
0       00
g x!=y  35 21
RTN     24
g NOP   35 01
1       01
RCL 3   34 03
EEX     43
2       02
/       81
f-1     32
TF 1    61
CHS     42
g NOP   35 01
+       61
f       31
TF 1    61
g       35
1/x     04
RCL 1   34 01
*       71
STO 2   33 02
RTN     24
LBL     23
C       13
STO 3   33 03
0       00
g x!=y  35 21
RTN     24
g NOP   35 01
1       01
RCL 2   34 02
RCL 1   34 01
f       31
TF 1    61
g x><y  35 07
g NOP   35 01
/       81
f       31
TF 1    61
g x><y  35 07
g NOP   35 01
-       51
EEX     43
2       02
*       71
STO 3   33 03
RTN     24
LBL     23
D       14
f-1     32
SF 1    51
RTN     24
LBL     23
E       15
f       31
SF 1    51
RTN     24
Visit this user's website Find all posts by this user
Quote this message in a reply
01-18-2020, 06:41 AM
Post: #2
RE: (HP-65) Markup - % of price and % of cost
Finally someone here interested about Markup% and Margin%
I called this Business Percent as " Profit on Pricing " calculations.

I have program this on serveral HP RPN programmable calculator here.

HP-12C
https://www.hpmuseum.org/forum/thread-13043.html

HP-11C
https://www.hpmuseum.org/forum/thread-12947.html

HP-41C
https://www.hpmuseum.org/forum/thread-14258.html

HP-67
https://www.hpmuseum.org/forum/thread-12987.html

Your program algorithm is very interesting compared to my version.

Gamo
Find all posts by this user
Quote this message in a reply
01-18-2020, 02:11 PM
Post: #3
RE: (HP-65) Markup - % of price and % of cost
You have to get creative when you only have 100 steps, and things like LBL, GTO, and 1/x take 2 of them. Wink

I was trying to come up with a way to have all four variables without the manual mode switch, but I don't think it can be done elegantly in the space available.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-18-2020, 07:27 PM
Post: #4
RE: (HP-65) Markup - % of price and % of cost
In line #11, the shouldn’t the key code be 81 instead of 61?

/ =81
+ = 61

Dave

RPN rules!
Find all posts by this user
Quote this message in a reply
01-18-2020, 07:44 PM
Post: #5
RE: (HP-65) Markup - % of price and % of cost
(01-18-2020 07:27 PM)DaveBr Wrote:  In line #11, the shouldn’t the key code be 81 instead of 61?

/ =81
+ = 61

Dave

You are correct, thanks. I was transcribing this rather late at night. Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
01-19-2020, 09:08 AM
Post: #6
RE: (HP-65) Markup - % of price and % of cost
Pricing on Profit program for HP-12C took only 60 program steps.

Gamo
Find all posts by this user
Quote this message in a reply
01-19-2020, 01:08 PM
Post: #7
RE: (HP-65) Markup - % of price and % of cost
(01-19-2020 09:08 AM)Gamo Wrote:  Pricing on Profit program for HP-12C took only 60 program steps.

Gamo

Interesting. I'll have to give it a closer look, but that might fit on the 65. However, any GTO would become 2 steps and require a matching LBL - which would also be 2 steps - the 65 doesn't have built-in percent functions, so those would become more steps, and functions like 1/x are unmerged and take two steps (one for the shift key).
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)