• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

Get cost per mile

Is there a way to get cost per mile only using multiplication any numbers are good positive or neg

example:

Total Revenue= $100
Total Miles = 100
Cost per Mile = $1
0
Blueice13085
Asked:
Blueice13085
  • 5
  • 5
  • 3
  • +2
1 Solution
 
Pasha KravtsovSupport EngineerCommented:
Not sure what you're asking..
I'm assuming you're wondering
let x represent total miles
let y represent cost per mile
x * y = total cost
0
 
käµfm³d 👽Commented:
Does exponentiation count as multiplication? If so:

cpm = tRev * (tMiles ^ -1)

Open in new window

0
 
Blueice13085Author Commented:
Pasha Kravtsov to use your way it would look like this

let X represent total miles
let Y represent cost per mile
let R represent total revenue
let N represent (your choice of ANY number)


X*R*N=Y
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Blueice13085Author Commented:
whats ^ represent?
0
 
Thibault St john Cholmondeley-ffeatherstonehaugh the 2ndCommented:
You could multiply the total cost by the inverse of the number of miles. It isn't quite division but it has a similar result.
0
 
käµfm³d 👽Commented:
"Raised to the power."
0
 
Blueice13085Author Commented:
Elaine and Kaufmed can you give me some examples so i can see what you are talking about thanks
0
 
käµfm³d 👽Commented:
Elaine is mentioning exactly what I am talking about. I am simply showing it in mathematical terms.

All I am saying is that you raise the total miles to the -1 power--this creates the inverse that Elaine mentioned. Then the remaining operation is multiplication.

I'm not sure how much more of an "example" I can provide. I suppose I can plug in the numbers that you show:

cpm = tRev * (tMiles ^ -1)

1.00 = 100.00 * (100 ^ -1)

Open in new window

0
 
Thibault St john Cholmondeley-ffeatherstonehaugh the 2ndCommented:
Kaufmed, thanks for explaining. I am viewing this in mobile interface and sorry, but I hadn't opened your code snippet so I may have repeated your answer.
0
 
Blueice13085Author Commented:
what i mean is i dont have a way of using ^ -1 so how can i replace the ^ would this just be like this

1.00 = 100 *( 100*100*-1)
0
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
No points - yes

Is this for a website?  Which language are you using?  Javascript, php, vb, vbscript, something else?
0
 
Thibault St john Cholmondeley-ffeatherstonehaugh the 2ndCommented:
Some languages use double star (**) to raise to a power.
0
 
Blueice13085Author Commented:
here is some screen shots i made. The X is the same as *

i can only use #'s no Signs like *,^,etc...

calculation 1calculation 2
0
 
Thibault St john Cholmondeley-ffeatherstonehaugh the 2ndCommented:
If that is the tool you have to work with I think you could only do it by manually calculating the inverse of the distance and inputting the result.
So for instance
Total cost= 120
Miles=50

Inverse miles = 1/50 (1 divided by 50) = 0.02

So input 120 x 0.02 to get 2.4 per mile.
0
 
Thibault St john Cholmondeley-ffeatherstonehaugh the 2ndCommented:
But beware because that looks like you are calculating total cost by adding different expenses. Surely you should be inputting cost per mile and the number of miles to let it calculate the total cost for you?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 5
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now