# Ratio Calculator

The relationship between two numbers is said to be ratio. It can be expressed as a to b (or) a/b (or) a : b. Perform the basic arithmetic operations (addition, subtraction, multiplication and division) using this ratio calculator. A ratio of 1 : 2 means that the second part is twice as large as first one. Similarly, 1 : 4 means second part is four times large as first part.

## Addition, Subtraction, Multiplication, Division of Ratios

The relationship between two numbers is said to be ratio. It can be expressed as a to b (or) a/b (or) a : b. Perform the basic arithmetic operations (addition, subtraction, multiplication and division) using this ratio calculator. A ratio of 1 : 2 means that the second part is twice as large as first one. Similarly, 1 : 4 means second part is four times large as first part.

Code to add this calci to your website

#### Formula:

**Addition: **
C_{a} = (a1/b1) + (a2/b2) = ((a1*b2) + (a2*b1)) / (b1 * b2)
**Subtraction:**
C_{s} = (a1/b1) - (a2/b2) = ((a1*b2) - (a2*b1)) / (b1 * b2)
**Multiplication:**
C_{m} = (a1/b1) * (a2/b2) = ((a1*a2) / (b1*b2))
**Division:**
C_{d} = (a1/b1) / (a2/b2) = ((a1*b2) / (b1*a2))
**Where,**
C_{a} = Ratio Addition
C_{s} = Ratio Subtraction
C_{m} = Ratio Multiplication
C_{d} = Ratio Division
a1, a2 = Numerator Input
b1, b2 = Denominator Input
### Example

#### Ratios Addition

**The process of adding two (or) more ratios is called as ratio addition.**

Add the ratios 1 : 2, 3 : 4,

C_{a} = (a1/b1) + (a2/b2)

C_{a} = ((a1*b2) + (a2*b1)) / (b1 * b2)

C_{a} = ((1*4) + (3*2)) / (2 * 4)

By adding the two ratios, you will get 10 : 8 which is equal to 1.25

#### Ratios Subtraction

**The process of subtracting two (or) more ratios is called as ratio subtraction.**

Subtract the ratios 1 : 2, 3 : 4,

C_{s} = (a1/b1) - (a2/b2)

C_{s} = ((a1*b2) - (a2*b1)) / (b1 * b2)

C_{s} = ((1*4) - (3*2)) / (2 * 4)

By subtracting the three ratios, you will get -2 : 8 which is equal to -0.25

#### Ratios Multiplication

**The process of multiplying one ratio with the another ratio is called as ratio multiplication.**

Multiply the ratios 10 : 20, 30 : 40 ,

C_{m} = (a1/b1) * (a2/b2)

C_{m} = ((a1*a2) / (b1*b2))

C_{m} = ((10*30) / (20*40))

By multiplying the two ratios, you will get 300 : 800 which is equal to 0.375

#### Ratios Division

**The process of dividing two ratios is called as ratio division.**

Divide the ratios 1 : 3, 5 : 4 ,

C_{d} = (a1/b1) / (a2/b2)

C_{d} = ((a1*b2) / (b1*a2))

C_{m} = ((1*4) / (3*5))

By dividing the two ratios, you will get 4 : 15 which is equal to 0.2667