# 比与比例计算器

> Simplify a ratio, solve a proportion a : b = c : x for the missing term, scale a ratio to a target, or split an amount in a given ratio, exactly.

交互版本：https://www.calcopenly.com/zh/math/ratio-calculator
主题：数学计算器

A ratio compares quantities by division, so 12 : 18 and 2 : 3 describe the same proportion. Simplifying divides every term by their greatest common divisor, after multiplying through by the least common multiple of any denominators so that decimal and fraction terms become whole numbers. A proportion a : b = c : d holds exactly when a × d = b × c, which is how cross-multiplication finds a missing term; splitting an amount divides it by the sum of the terms to get the size of one share.

Recipes, paint and concrete mixes, map scales and dividing money between partners are the usual uses. Split 1,000 in the ratio 2 : 3 : 5 and the 10 shares are worth 100 each, giving 200, 300 and 500; solve 3 : 4 = 9 : x and x = 4 × 9 ÷ 3 = 12.

Answers stay exact: shares that do not divide evenly appear as fractions such as 100/3 rather than rounded decimals. Terms must be zero or positive.

## 输入

- **I want to** (选项：Simplify a ratio, Scale a ratio to a target, Find the missing term (a : b = c : d), Split an amount by a ratio)
- **Ratio**: Terms separated by colons; decimals and fractions are fine (1.5 : 2.5, 1/2 : 3/4)
- **Term to set**: Which term (1 = first) should become the target
- **Target value for that term**
- **a**: Type x in the one term you want to find
- **b**
- **c**
- **d**
- **Amount to split**
- **Ratio**

## 结果

- 结果 — 主要结果
- Missing term
- Scale factor
- First term ÷ second term

## 公式

$$
\begin{gathered} \frac{a}{b} = \frac{c}{d} \iff a d = b c \\[10pt] \text{share}_i = T \cdot \frac{r_i}{\sum_j r_j} \end{gathered}
$$

## 计算示例

### Simplify 12 : 18

- I want to: Simplify a ratio
- Ratio: 12 : 18
- **结果: 2 : 3**
- **Scale factor: 6**
- **First term ÷ second term: 0.666667**
- 核验来源：gcd(12, 18) = 6 (Python math.gcd)

### Decimal terms 1.5 : 2.5

- I want to: Simplify a ratio
- Ratio: 1.5 : 2.5
- **结果: 3 : 5**
- **Scale factor: 0.5**
- 核验来源：×10 → 15 : 25, gcd 5 (Python fractions)

### Fraction terms 1/2 : 3/4 : 5/6

- I want to: Simplify a ratio
- Ratio: 1/2 : 3/4 : 5/6
- **结果: 6 : 9 : 10**
- 核验来源：LCD 12 → 6 : 9 : 10, gcd 1 (Python fractions)

### Scale 2 : 3 so the first term is 30

- I want to: Scale a ratio to a target
- Ratio: 2 : 3
- Target value for that term: 30
- **结果: 30 : 45**
- **Scale factor: 15**
- 核验来源：30 / 2 = 15; 3 × 15 = 45

### Solve 3 : 4 = 9 : x

- I want to: Find the missing term (a : b = c : d)
- a: 3
- b: 4
- c: 9
- d: x
- **Missing term: 12**
- **结果: x = 12**
- 核验来源：Cross-multiplication: x = 4 × 9 / 3 = 12

### Missing first term x : 5 = 6 : 15

- I want to: Find the missing term (a : b = c : d)
- a: x
- b: 5
- c: 6
- d: 15
- **Missing term: 2**
- 核验来源：x = 5 × 6 / 15 = 2

## 常见问题

### How do you simplify a ratio?

Divide every term by the greatest common divisor of the terms. For 12 : 18 the GCD is 6, giving 2 : 3. Decimals and fractions are cleared first by multiplying every term by the same number: 1.5 : 2.5 × 2 = 3 : 5, and 1/2 : 3/4 : 5/6 × 12 = 6 : 9 : 10, which is already in simplest form because its GCD is 1.

### How do you solve a proportion for x?

Cross-multiply, then divide. In 3 : 4 = 9 : x the products of the diagonal terms are equal, so 3x = 4 × 9 = 36 and x = 12. The unknown can sit in any position: in x : 5 = 6 : 15, 15x = 5 × 6 = 30, so x = 2. If the term diagonally opposite x is 0, there is no single answer.

### How do you divide an amount in a ratio?

Add the ratio terms, divide the amount by that total to get one share, then multiply each term by the share. For 1,000 split 2 : 3 : 5 the terms add to 10, one share is 100, and the parts are 200, 300 and 500. The parts always add back to the amount; 100 split 1 : 2 gives 100/3 and 200/3, about 33.33 and 66.67.

### What is the difference between a ratio and a fraction?

A ratio compares parts with each other; a fraction compares a part with the whole. In a class of 12 girls and 18 boys the ratio of girls to boys is 12 : 18 = 2 : 3, but girls make up 12/30 = 2/5 of the class. A two-term ratio a : b becomes the fraction a/(a + b) of the whole.

### How do you scale a ratio up or down?

Multiply or divide every term by the same factor. To make the first term of 2 : 3 equal 30, the factor is 30 ÷ 2 = 15, so the scaled ratio is 30 : 45. Scaling a recipe works the same way: a 2 : 3 mix made 15 times larger needs 30 and 45 units of the two ingredients, and the proportions stay 40% and 60%.

### “比与比例计算器”有多准确？

准确性取决于输入值和方法的假设。十进制运算使用50位有效数字，但估算、数值方法和源数据的精度可能较低；显示时的舍入并不能消除这些限制。 已按独立来源核验的计算示例：8。 例如，“Simplify 12 : 18”根据gcd(12, 18) = 6 (Python math.gcd)进行核验。

### 这种方法出自哪里？

Khan Academy — Ratios, rates and proportions; Wolfram MathWorld — Proportional.

## 来源

- [Khan Academy — Ratios, rates and proportions](https://www.khanacademy.org/math/pre-algebra/pre-algebra-ratios-rates)
- [Wolfram MathWorld — Proportional](https://mathworld.wolfram.com/Proportional.html)
