{
  "id": "proportion",
  "version": "0706eb4d40ad",
  "status": "published",
  "name": "Proportion Calculator",
  "question": "How do I solve a proportion?",
  "summary": "Solves the proportion a/b = c/d for the missing number by cross-multiplication, as an exact fraction and a decimal, or checks whether four numbers form a proportion.",
  "category": "math",
  "subcategory": "arithmetic",
  "url": "https://www.acalculator.org/math/proportion-calculator",
  "markdown": "https://www.acalculator.org/math/proportion-calculator.md",
  "kind": "function",
  "method": "a/b = c/d means a × d = b × c (cross-multiplication); divide by the number next to the unknown.",
  "assumptions": [
    "b and d are the bottoms of the fractions and cannot be 0.",
    "Every number is read exactly as typed (0.1 is 1/10), and the arithmetic is exact before rounding for display.",
    "With all four numbers typed, the calculator checks whether they form a proportion instead."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "a": {
        "title": "a",
        "description": "The top of the first fraction, a/b.",
        "type": "number"
      },
      "b": {
        "title": "b",
        "description": "The bottom of the first fraction, a/b. It cannot be 0.",
        "type": "number"
      },
      "c": {
        "title": "c",
        "description": "The top of the second fraction, c/d. Leave the number to find empty.",
        "type": "number"
      },
      "d": {
        "title": "d",
        "description": "The bottom of the second fraction, c/d. It cannot be 0.",
        "type": "number"
      }
    }
  },
  "outputs": {
    "x": {
      "label": "Missing number",
      "description": "The number that makes a/b = c/d true, in place of the box left empty.",
      "format": "number"
    },
    "fraction": {
      "label": "Missing number as a fraction",
      "description": "The missing number as an exact fraction in lowest terms.",
      "format": "text"
    },
    "proportional": {
      "label": "Do the four numbers form a proportion?",
      "description": "With all four numbers typed: Yes when a × d = b × c exactly, else No.",
      "format": "boolean"
    },
    "ratio": {
      "label": "Value of a/b",
      "description": "The first fraction a/b in lowest terms.",
      "format": "text"
    },
    "steps": {
      "label": "Cross-multiplication",
      "description": "The working: cross-multiply, then divide by the number next to the unknown.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "a": 3,
      "b": 4,
      "d": 10
    },
    "outputs": {
      "x": 7.5,
      "fraction": "15/2",
      "ratio": "3/4",
      "steps": "Cross-multiply: 3 × 10 = 4 × c; 4 × c = 30; c = 30 ÷ 4 = 15/2; As a decimal: c = 7.5"
    },
    "text": "The missing number in the proportion is 7.5 (15/2)."
  },
  "examples": [
    {
      "given": {
        "a": 3,
        "b": 4,
        "d": 10
      },
      "expect": {
        "x": 7.5,
        "fraction": "15/2",
        "ratio": "3/4",
        "steps": "Cross-multiply: 3 × 10 = 4 × c; 4 × c = 30; c = 30 ÷ 4 = 15/2; As a decimal: c = 7.5"
      },
      "source": "OpenStax, Prealgebra 2e, §6.5, cross products (https://openstax.org/books/prealgebra-2e/pages/6-5-solve-proportions-and-their-applications); hand calculation in content.mdx: 4c = 3 × 10 = 30, c = 30 ÷ 4 = 7.5 (OpenStax Prealgebra 2e §6.5)"
    },
    {
      "given": {
        "a": 5,
        "c": 20,
        "d": 36
      },
      "expect": {
        "x": 9,
        "fraction": "9",
        "ratio": "5/9"
      },
      "source": "hand calculation in content.mdx: 20b = 5 × 36 = 180, b = 9"
    },
    {
      "given": {
        "b": 3,
        "c": 2,
        "d": 7
      },
      "expect": {
        "x": 0.8571428571428571,
        "fraction": "6/7"
      },
      "source": "hand calculation in content.mdx: 7a = 3 × 2 = 6, a = 6/7; Python 3: fractions.Fraction(6, 7), 6/7"
    },
    {
      "given": {
        "a": 0.1,
        "b": 0.3,
        "c": 5
      },
      "expect": {
        "x": 15,
        "fraction": "15",
        "ratio": "1/3"
      },
      "source": "hand calculation in content.mdx: decimals read exactly, 0.1d = 0.3 × 5 = 1.5, d = 15"
    },
    {
      "given": {
        "a": -2,
        "b": 5,
        "d": 8
      },
      "expect": {
        "x": -3.2,
        "fraction": "-16/5"
      },
      "source": "hand calculation in content.mdx: 5c = −2 × 8 = −16, c = −16/5 = −3.2"
    },
    {
      "given": {
        "a": 3,
        "b": 4,
        "c": 9,
        "d": 12
      },
      "expect": {
        "proportional": true,
        "ratio": "3/4"
      },
      "source": "hand calculation in content.mdx: 3 × 12 = 36 = 4 × 9"
    },
    {
      "given": {
        "a": 2,
        "b": 3,
        "c": 5,
        "d": 7
      },
      "expect": {
        "proportional": false
      },
      "source": "hand calculation in content.mdx: 2 × 7 = 14, 3 × 5 = 15"
    }
  ],
  "sources": [
    "OpenStax, Prealgebra 2e, §6.5 Solve Proportions and their Applications (cross products: a/b = c/d means ad = bc). https://openstax.org/books/prealgebra-2e/pages/6-5-solve-proportions-and-their-applications"
  ],
  "related": [
    "ratio",
    "fraction",
    "percentage",
    "aspect-ratio"
  ],
  "changelog": []
}
