percentage remaining

We put engines on the planes, Each engine has time_since_new - eg 22538 (in hours)

We also have a customer profile that we say that for this customer the life limit hours is 50000 ( hours)
Now I want to calculate the percentage time remaining

I do 50000 minus 22538 and then get the percentage? Help appreciated.
LVL 6
anumosesAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Bill BachConnect With a Mentor PresidentCommented:
(TotalLife - UsedLife) / TotalLife * 100%, or (50000 - 22538)/50000 * 100%.
0
 
anumosesAuthor Commented:
((life_limit_hours/percent_time_remaining)*100) as answer_percent

As you mentioned this seems correct
0
 
anumosesAuthor Commented:
select round((50000 - 22538)/50000 * 100,2) from dual

I get 54.92 percent remaining
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
awed1Connect With a Mentor Commented:
1- [Current hours (22538)/Total hours(50000)]=%of hours remaining.
1-.45076 = .54924 which is 54.924% rounds to 55%
0
 
Bill BachConnect With a Mentor PresidentCommented:
Exactly.  If you didn't want the value as a percentage, simply eliminate the *100 and you'll be left with a decimal value.
0
 
anumosesAuthor Commented:
Thanks
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.