Math Formula Question - Need Ideas

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

•  Subject
• Author
• Posted on
I have a math question to which I can't find the answer.  Here is the
scenario:

Someone goes to a store and has \$100.00 worth of items.  The merchant
gives the customer a 10% discount, so only \$90.00 is sent to the bank.
Of the original amount, \$10.00 goes to the customer for the discount,
\$80.00 goes to the merchant, \$10.00 goes for a processing fee.  But those
amounts have to be calced on the original amount, not what the bank got.
I need a formula to find the original amount if I have the percentage
(10%) and the amount the bank got (\$90.00).  I know in my head that the
original amount is \$100.00, but I have to do it programatically.

I know this is probably dead simple, but I just can't get my head around
it.

--
Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/
The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/
Please respond to the group so others can share

Re: Math Formula Question - Need Ideas

On 1/4/14, 7:26 PM, Adrienne Boswell wrote:

10%  is 0.1

You got the \$90 by multiplying the original \$100 by (1-0.1) to get \$90,
so you can divide the \$90 by (1 - 0.1) to get the original \$100

Re: Math Formula Question - Need Ideas

On Sat, 04 Jan 2014 19:33:31 -0500, Richard Damon wrote:

Then, state and local taxes are usually calc'd on the original price,
not the discounted price.

Re: Math Formula Question - Need Ideas

On 1/5/2014 12:56 PM, Allodoxaphobia wrote:

Incorrect.  State and local taxes are calculated on the actual
(discounted) selling price.

At least that's so in the United States.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Math Formula Question - Need Ideas

On Sun, 05 Jan 2014 13:15:17 -0500, Jerry Stuckle

This looks more like tax law than php however I have to admit the
discussion is interesting.

--

John

Re: Math Formula Question - Need Ideas

On 05/01/14 00:26, Adrienne Boswell wrote:

no., The customer gets the goods.

If you say so

\$10.00 goes for a processing fee.

who gets that?

But those

are you for real?

\$90/(1-0.1) = \$100

0.1 being 10%..

A degree in media studies...or was it 'climate science' ?...;-)

--
Ineptocracy

(in-ep-tocβ-ra-cy) β a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.

Re: Math Formula Question - Need Ideas

On 1/4/2014 7:37 PM, The Natural Philosopher wrote:

Plus \$10.00 of the original \$100.00

That's one of the original conditions.

Maybe a credit card processor?  Maybe the product is being shipped and
this is postage and handling?  Who knows.

More importantly, it doesn't matter.  It's another of the original
conditions.

Well, we know you can do first grade math, anyway.  But then the OP SAID
it was 10%.  Maybe you have some problem understanding him?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Math Formula Question - Need Ideas

On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote:

If a * b = c then

a = c / b

b = c / a

In your case, 100 * 0.9 = 90

Therefore to get the original,

90 / 0.9 = 100

0.9 being the decimal fraction that equates to 90%, ie the amount the
customer paid after discount.

Observation though, processing fees are usually a % of the amount paid.

eg if a card payment processing service charges 1.25%, that would be

Invoice: =        100.00
Discount: 10% =    10.00
Amount due: =      90.00
========================
Processing: 10% =   9.00
Amount to bank: =  81.00

The payment processing is only concerned with the amount of the
transaction that it actually processes, not some other intermediate
calculation between the merchant and the customer.

Consider the case where the customer is given a 95% discount by the
store. If your processing service still charges 10% of the original
amount, the your processing fee is more than actual transaction value:

Invoice: =                  100.00
Discount: 10% =              95.00
Amount due: =                 5.00
==================================
Processing: 10% of 100.00 =  10.00
Amount to bank: =            -5.00 ???? Error

The correct math for this case is more likely:

Invoice: =        100.00
Discount: 10% =    95.00
Amount due: =       5.00
========================
Processing: 10% =   0.50
Amount to bank: =   4.50

As a general rule, payment processing systems only concern themselves
with the amounts that they are handling, and not other amounts that may
have appeared in calculations made outside of their own systems.

Of course, if you're working on something like a sales commission basis,
that might be a different set of rules, as you might expect to be
receiving a commission based on the listed price, regardless of whether
the items are sold at a discount or not.

--
Denis McMahon, denismfmcmahon@gmail.com

Re: Math Formula Question - Need Ideas

On 1/4/2014 7:54 PM, Denis McMahon wrote:

Actually, Denis, since the original statement was the processor gets
\$10, he would get \$10/\$90 or 11.11% of the sale.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Math Formula Question - Need Ideas

On Sat, 04 Jan 2014 20:22:31 -0500, Jerry Stuckle wrote:

Yeah, I took the statement "those amounts have to be calced on the
original amount" as implying that the processing fee was being calculated
on the pre-discounted total, as was the discount.

Which is what led me to querying the nature of the processing fee, and
whether given it's nature it's being calculated at the right point,
because I would expect that a [payment] processing fee would normally be
related to the amount of the actual transaction, which as you say is
\$10 / \$90 in this case.

I'm also wondering if Adrienne is perhaps using the term "processing fee"
in a way other than that which I expect it to be used - we do get the
"some people use a slightly different english" problem here occasionally.

eg if "processing" was something like shipping and packing, \$10 per
order, then it would be \$10 regardless of the original amount or the
discounter amount, but then I wouldn't expect the processing fee to be
calculated from the transaction cost at all, I'd expect it to be mainly a
function of the total volume / weight and possibly item count of the
goods involved.

--
Denis McMahon, denismfmcmahon@gmail.com

Re: Math Formula Question - Need Ideas

On 1/5/2014 11:40 AM, Denis McMahon wrote:

Agreed.  The entire question isn't real clear - no wonder the OP is
having problems with it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Math Formula Question - Need Ideas

I probably should have put processing in quotes, we're using that term
for something that includes membership fees, and other charges.

Sometimes, when you write a word correctly, it looks wrong, so you ask
someone else how to spell it.  That's what happened to me here, I didn't
think I was doing it right and got myself all confused.  I want to thank
everyone who responded for their help and confirming what I thought.  I
feel better now.

--
Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/
The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/
Please respond to the group so others can share

Re: Math Formula Question - Need Ideas

[You cannot be serious asking a question regarding simple arithmetic
(percentage calculation, for crying out loud) in a newsgroup for a
programming language β without showing any attempt to solve it by

PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm (404-comp.)

Re: Math Formula Question - Need Ideas

Yes, I can be serious asking a question like this.  Have you ever looked
at something you spelled correctly, and it doesn't look right?
Sometimes, I think something is harder than it is, and confuse myself.
That's what happened here.

--
Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/
The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/
Please respond to the group so others can share

Re: Math Formula Question - Need Ideas

On 1/5/2014 5:56 PM, Adrienne Boswell wrote:

Don't pay any attention to Pointed Head.  He's just being his usual
pedantic self.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Math Formula Question - Need Ideas

Sigh. [psf 10.1]  You have a problem with basic arithmetic, not PHP.  Why
are you asking in a PHP newsgroup (other than to troll here)?  *At least*
you should have the decency to ask in a *math* newsgroup (where people will
tell you, iff they do not ignore you, that you learn these things in
highschool β or its national equivalent).