i want formula for this calculation-VBForums

# Thread: i want formula for this calculation

1. ## i want formula for this calculation

Hello,

I have been using vb.net

I have this calculation

2.0 = 90%

3.75 = 80%

Now, suppose i would have value something line 2.85

So, i need exact percentage for this value.Moreover, result must fall between 90%-80%.

How can i get this ?

Help me out,

Regards,
ASIF

2. ## Re: i want formula for this calculation

That question has nothing whatsoever to do with ASP.NET. It doesn't even really have anything to do with programming. That's a basic maths question. This is not a maths forum. You need to work out yours maths BEFORE you write any code. The code is not the solution but rather an implementation of the solution. You need to pick up a pen and paper and work out how to do the maths first. Once you are able to perform the calculation manually and come up with the correct answer, then we can help you write code to implement that solution.

3. ## Re: i want formula for this calculation

Hello,

Agreed with John.

I have moved this question to the Maths Forum.

Thanks

Gary

4. ## Re: i want formula for this calculation

This is a really trivial algebra question. You have two points (x1,y1) = (2.0, 0.9) and (x2,y2) = (3.75, 0.8), and want to find (x3,y3) = (2.85, ???) (aka you want to solve for y3 given x3 = 2.85). I'm going to assume all three points lie on the same line (If that is not the case, then you have not provided enough information to solve this problem).

The formula for a line is y = ax + b, where b is the y-intercept and a is the slope. Given that you have two points, you can easily solve for both a and b:

a = (y1-y2)/(x1-x2)
b = (x1*y2 - x2*y1)/(x1-x2)

I'll leave it as an exercise for you to actually solve these equations given the two points you have. After that, simply insert the results into the equation of the line to get:
y3 = a * 2.85 + b

5. ## Re: i want formula for this calculation

Originally Posted by Lenggries
This is a really trivial algebra question.
Exactly.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•