473,396 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

interesting math issue

Hi all,

So here is a little brain teaser that I need to solve.

I need to calculate a tax amount based on a certain $ amount. However the
caveat is that the tax amount is a component of the $ amount. So, in my
example:-

Amount: $10,000
Formula for Tax Amount: Amount*0.0035

Howerver, Tax Amount needs to be included in Amount.

Can this be solved?
Mar 26 '07 #1
5 1154
<pa***@community.nospamwrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
Hi all,

So here is a little brain teaser that I need to solve.

I need to calculate a tax amount based on a certain $ amount. However the
caveat is that the tax amount is a component of the $ amount. So, in my
example:-

Amount: $10,000
Formula for Tax Amount: Amount*0.0035

Howerver, Tax Amount needs to be included in Amount.

Can this be solved?
So Amount = OrigAmount * (1 + 0.0035) ?

OrigAmount = Amount / (1.0035)
OrigAmount = $9965.12

That's assuming I understand your question.

Michael
Mar 27 '07 #2
pa***@community.nospam schreef:
Hi all,

So here is a little brain teaser that I need to solve.

I need to calculate a tax amount based on a certain $ amount. However the
caveat is that the tax amount is a component of the $ amount. So, in my
example:-

Amount: $10,000
Formula for Tax Amount: Amount*0.0035

Howerver, Tax Amount needs to be included in Amount.

Can this be solved?

Basic math:
OrgAmount=Taxedamount/1.0035
--
Rinze van Huizen
C-Services Holland b.v
Mar 27 '07 #3
So I guess to understand correctly, let us assume the following 3 variables:

FinalAmount: $10,000
Tax Amount: = 10,000*0.0035 = $35

But the tricky part the final amount always needs to be 10,000. So if we
back the amount down to (10000-35) = 9965, then that will now change the tax
amount.
"Michael C" <no****@nospam.comwrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
<pa***@community.nospamwrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
>Hi all,

So here is a little brain teaser that I need to solve.

I need to calculate a tax amount based on a certain $ amount. However the
caveat is that the tax amount is a component of the $ amount. So, in my
example:-

Amount: $10,000
Formula for Tax Amount: Amount*0.0035

Howerver, Tax Amount needs to be included in Amount.

Can this be solved?

So Amount = OrigAmount * (1 + 0.0035) ?

OrigAmount = Amount / (1.0035)
OrigAmount = $9965.12

That's assuming I understand your question.

Michael

Mar 27 '07 #4
pa***@community.nospam wrote:
So I guess to understand correctly, let us assume the following 3
variables:
FinalAmount: $10,000
Tax Amount: = 10,000*0.0035 = $35

But the tricky part the final amount always needs to be 10,000. So if
we back the amount down to (10000-35) = 9965, then that will now
change the tax amount.
No,
final amount=initial amount+tax amount (eqn 1)

where
tax amount=initial amount*tax rate (eqn 2)

substituting (eqn 2) into (eqn 1) gives
final amount=initial amount+(initial amount*tax rate)

which is
final amount=initial amount*(1+tax rate) (eqn 3)

divide both sides of (eqn 3) by (1+tax amount) and re-arrange to give
initial amount=final amount/(1+tax amount)

Putting in the figures final amount=10,000 and tax rate=0.0035:
initial amount=10,000/(1+0.0035)
initial amount=9965.12

HTH

Andrew
Mar 27 '07 #5
pa***@community.nospam schreef:
So I guess to understand correctly, let us assume the following 3 variables:

FinalAmount: $10,000
Tax Amount: = 10,000*0.0035 = $35

But the tricky part the final amount always needs to be 10,000. So if we
back the amount down to (10000-35) = 9965, then that will now change the tax
amount.
That is not correct. The final amount is 10000 which includes the 0.35
percent tax. You're making the mistake of calculating the tax over an
amount that already has the tax included. So to get the untaxed amount
you divide by 1.0035

10000/1.0035 = 9965.12 (approx)
So the taxamount = 34.88 (approx)

I say approx because there's some rounding in there.

The formula is a=b*(1+c)
therefore b = a/(1+c)
where
a=totaltaxedamount
b=untaxedamount
c=taxpercentage
--
Rinze van Huizen
C-Services Holland b.v
Mar 27 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

89
by: Radioactive Man | last post by:
In python 2.3 (IDLE 1.0.3) running under windows 95, I get the following types of errors whenever I do simple arithmetic: 1st example: >>> 12.10 + 8.30 20.399999999999999 >>> 1.1 - 0.2...
17
by: cwdjrxyz | last post by:
Javascript has a very small math function list. However there is no reason that this list can not be extended greatly. Speed is not an issue, unless you nest complicated calculations several levels...
15
by: Ingmar | last post by:
Simple comparison tests we have performed show that System.Math functions in C# are much slower than corresponding functions in C++. Extreme examples are System.Math.Exp() and System.Math.Tan(),...
110
by: Gregory Pietsch | last post by:
I'm writing a portable implementation of the C standard library for http://www.clc-wiki.net and I was wondering if someone could check the functions in math.h for sanity/portability/whatever. I'm...
6
by: per9000 | last post by:
An interesting/annoying problem. I created a small example to provoke an exception I keep getting. Basically I have a C-struct (Container) with a function-pointer in it. I perform repeated calls...
1
by: Jerry Hill | last post by:
On Thu, May 22, 2008 at 12:32 PM, Dutton, Sam <Sam.Dutton@itn.co.ukwrote: I believe this is an issue with the precision of IEEE floating point numbers. Those are the types of numbers used by the...
5
by: BEES INC | last post by:
I've been awfully busy programming lately. My Django-based side project is coming along well and I hope to have it ready for use in a few weeks. Please don't ask more about it, that's really all I...
0
by: Gary Herron | last post by:
BEES INC wrote: Much simpler this way. This produces the number of whole start and the number of half stars: v = ... calculate the average ... whole = int(v+0.25) half =...
0
by: M.-A. Lemburg | last post by:
On 2008-10-25 20:19, Akira Kitada wrote: Thanks. The errors you are getting appear to be related to either some missing header files or a missing symbol definition to enable these - looking...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.