22

I have a width: 240 I have aspect ratio: 2.40 I need to get the height based on those two variables. What's the formula?

Shawn
  • 223
  • 1
  • 2
  • 4

2 Answers2

65

Definition of the ratio:

ratio = width / height

Formula:

height = width / ratio = 240 / 2.40 = 100

Daniel Kvist
  • 2,872
  • 5
  • 25
  • 49
darma
  • 4,592
  • 1
  • 22
  • 25
10

example of calculating 2:40 . using javascript programming language.

var width = 240 ;
var rat1 = 2;
var rat2 = 40;

var ratio  = width / rat1;
var calculated_height = ratio * rat2;
Softmixt
  • 1,568
  • 19
  • 18