{
  "id": "square-yards",
  "version": "1db6a52c98f5",
  "status": "published",
  "name": "Square Yards Calculator",
  "question": "How many square yards?",
  "summary": "Square yard calculator: the area of a rectangle, circle, triangle or trapezoid in square yards, square feet and square metres, with the cost at a price per square yard, as carpet and sod are sold.",
  "category": "construction",
  "subcategory": "flooring",
  "url": "https://www.acalculator.org/construction/square-yards-calculator",
  "markdown": "https://www.acalculator.org/construction/square-yards-calculator.md",
  "kind": "function",
  "method": "square yards = area of the shape × how many ÷ 9 ft²; cost = square yards × the price per square yard",
  "assumptions": [
    "Rectangle: length × width. Circle: π × diameter² ÷ 4. Triangle: base × height ÷ 2. Trapezoid: (top + bottom) ÷ 2 × height.",
    "The area is the flat area. It adds nothing for waste or seams."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "shape": {
        "title": "Shape",
        "description": "The shape of the area.",
        "type": "string",
        "enum": [
          "rectangle",
          "circle",
          "triangle",
          "trapezoid"
        ]
      },
      "len": {
        "title": "Length",
        "description": "The length of the rectangle.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "wid": {
        "title": "Width",
        "description": "The width of the rectangle.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "dia": {
        "title": "Diameter",
        "description": "The diameter of the circle.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "base": {
        "title": "Base",
        "description": "The base of the triangle.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "h": {
        "title": "Height",
        "description": "The height of the triangle or trapezoid, measured at right angles to the base.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "a": {
        "title": "Top side",
        "description": "The first of the two parallel sides of the trapezoid.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "b": {
        "title": "Bottom side",
        "description": "The second of the two parallel sides of the trapezoid.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "qty": {
        "title": "How many",
        "description": "How many areas of this size.",
        "type": "integer",
        "minimum": 1,
        "maximum": 100000
      },
      "price": {
        "title": "Price per square yard",
        "description": "The price of one square yard. Leave empty to skip the cost.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000
      }
    }
  },
  "outputs": {
    "squareYards": {
      "label": "Square yards",
      "description": "The total area in square yards (9 square feet each).",
      "format": "quantity",
      "unit": "yd2"
    },
    "squareFeet": {
      "label": "Square feet",
      "description": "The total area in square feet.",
      "format": "quantity",
      "unit": "ft2"
    },
    "squareMeters": {
      "label": "Square metres",
      "description": "The total area in square metres.",
      "format": "quantity",
      "unit": "m2"
    },
    "cost": {
      "label": "Cost",
      "description": "Square yards × the price per square yard.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "shape": "rectangle",
      "len": 3.6576000000000004,
      "wid": 4.572,
      "dia": 3.048,
      "base": 3.048,
      "h": 2.4384,
      "a": 1.8288000000000002,
      "b": 3.048,
      "qty": 1
    },
    "outputs": {
      "squareYards": 16.7225472,
      "squareFeet": 16.7225472,
      "squareMeters": 16.7225472
    },
    "text": "The area is 20 yd² (180 ft²)."
  },
  "examples": [
    {
      "given": {
        "shape": "rectangle",
        "len": 3.6576000000000004,
        "wid": 4.572,
        "qty": 1,
        "price": 25
      },
      "expect": {
        "squareYards": 16.7225472,
        "cost": 500
      },
      "source": "NIST SP 811 (2008), Appendix B: 1 ft = 0.3048 m and 1 yd = 0.9144 m exactly, so 1 yd² = 9 ft² = 0.83612736 m², https://www.nist.gov/pml/special-publication-811 (retrieved 2026-10-03); hand calculation in content.mdx: 12 × 15 = 180 ft² ÷ 9 = 20 yd²; × $25 = $500",
      "tolerance": 1e-12
    },
    {
      "given": {
        "shape": "rectangle",
        "len": 4,
        "wid": 5,
        "qty": 1
      },
      "expect": {
        "squareYards": 20
      },
      "source": "NIST SP 811 (2008), Appendix B: 1 ft = 0.3048 m and 1 yd = 0.9144 m exactly, so 1 yd² = 9 ft² = 0.83612736 m², https://www.nist.gov/pml/special-publication-811 (retrieved 2026-10-03); hand calculation in content.mdx: 20 m² ÷ 0.83612736 = 23.92 yd²"
    },
    {
      "given": {
        "shape": "trapezoid",
        "a": 1.8288000000000002,
        "b": 3.048,
        "h": 2.7432000000000003,
        "qty": 1,
        "price": 30
      },
      "expect": {
        "squareYards": 6.68901888,
        "cost": 240
      },
      "source": "NIST SP 811 (2008), Appendix B: 1 ft = 0.3048 m and 1 yd = 0.9144 m exactly, so 1 yd² = 9 ft² = 0.83612736 m², https://www.nist.gov/pml/special-publication-811 (retrieved 2026-10-03); hand calculation in content.mdx: (6 + 10) ÷ 2 × 9 = 72 ft² = 8 yd²; × $30 = $240",
      "tolerance": 1e-12
    },
    {
      "given": {
        "shape": "circle",
        "dia": 2.7432,
        "qty": 1
      },
      "expect": {
        "squareYards": 5.910236036193213
      },
      "source": "NIST SP 811 (2008), Appendix B: 1 ft = 0.3048 m and 1 yd = 0.9144 m exactly, so 1 yd² = 9 ft² = 0.83612736 m², https://www.nist.gov/pml/special-publication-811 (retrieved 2026-10-03); hand calculation in content.mdx: π × 3² ÷ 4 = 7.07 yd²",
      "tolerance": 1e-12
    }
  ],
  "sources": [
    "NIST SP 811 (2008), Appendix B: 1 ft = 0.3048 m and 1 yd = 0.9144 m exactly, so 1 yd² = 9 ft² = 0.83612736 m², retrieved 2026-10-03. https://www.nist.gov/pml/special-publication-811"
  ],
  "related": [
    "carpet",
    "flooring",
    "square-footage"
  ],
  "changelog": []
}
