{
  "id": "cubic-yards",
  "version": "930a69e8306b",
  "status": "published",
  "name": "Cubic Yards Calculator",
  "question": "How many cubic yards do I need?",
  "summary": "Computes the volume of material for a rectangle, square, circle, ring, triangle, trapezoid or rectangular border at a given depth, in cubic yards, cubic feet and cubic metres, with an optional cost.",
  "category": "construction",
  "url": "https://www.acalculator.org/construction/cubic-yards-calculator",
  "markdown": "https://www.acalculator.org/construction/cubic-yards-calculator.md",
  "kind": "function",
  "method": "volume = area of the shape × depth × how many; cubic yards = cubic feet ÷ 27",
  "assumptions": [
    "Rectangle: length × width. Square: side². Circle: π × diameter² ÷ 4. Ring: π × (outer² − inner²) ÷ 4. Triangle: Heron’s formula from the three sides. Trapezoid: (side A + side B) ÷ 2 × height.",
    "A rectangle border runs around the outside of the rectangle: (length + 2 × border) × (width + 2 × border) − length × width.",
    "The volume is the loose volume of the layer. It adds nothing for waste, settling or compaction.",
    "The cost is the total volume in the price unit × the price."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "shape": {
        "title": "Area shape",
        "description": "The shape of the area to fill.",
        "type": "string",
        "enum": [
          "rectangle",
          "square",
          "circle",
          "circle-border",
          "triangle",
          "trapezoid",
          "rectangle-border"
        ]
      },
      "len": {
        "title": "Length",
        "description": "The length of the rectangle, or the side of the square.",
        "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
      },
      "border": {
        "title": "Border width",
        "description": "How wide the border is, around the outside of the rectangle.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "dia": {
        "title": "Diameter",
        "description": "The outer diameter of the circle.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "inner": {
        "title": "Inner diameter",
        "description": "The diameter of the circle inside the ring, which is not filled.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "a": {
        "title": "Side A",
        "description": "The first side of the triangle, or the first parallel side of the trapezoid.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "b": {
        "title": "Side B",
        "description": "The second side of the triangle, or the second parallel side of the trapezoid.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "c": {
        "title": "Side C",
        "description": "The third side of the triangle.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "h": {
        "title": "Height",
        "description": "The distance between the two parallel sides of the trapezoid.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000
      },
      "dep": {
        "title": "Depth",
        "description": "How thick the layer of material is.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 1000
      },
      "quantity": {
        "title": "How many areas",
        "description": "How many areas of this size to fill.",
        "type": "integer",
        "minimum": 1,
        "maximum": 100000
      },
      "price": {
        "title": "Price",
        "description": "The price of the material per cubic yard, cubic foot or cubic metre. Leave empty to skip the cost.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000
      },
      "costUnit": {
        "title": "Price per",
        "description": "The volume unit the price is for.",
        "type": "string",
        "enum": [
          "cubic-yard",
          "cubic-foot",
          "cubic-meter"
        ]
      }
    }
  },
  "outputs": {
    "cubicYards": {
      "label": "Cubic yards",
      "description": "The total volume in cubic yards: area × depth × how many, ÷ 27 cubic feet per cubic yard.",
      "format": "quantity",
      "unit": "yd3"
    },
    "cubicFeet": {
      "label": "Cubic feet",
      "description": "The total volume in cubic feet.",
      "format": "quantity",
      "unit": "ft3"
    },
    "cubicMeters": {
      "label": "Cubic metres",
      "description": "The total volume in cubic metres.",
      "format": "quantity",
      "unit": "m3"
    },
    "area": {
      "label": "Area of one shape",
      "description": "The area of one shape, before multiplying by how many areas.",
      "format": "quantity",
      "unit": "ft2"
    },
    "total": {
      "label": "Total cost",
      "description": "The total volume in the price unit × the price.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "shape": "rectangle",
      "len": 3.048,
      "wid": 3.048,
      "border": 0.6096,
      "dia": 3.048,
      "inner": 1.8288000000000002,
      "a": 3.048,
      "b": 3.048,
      "c": 3.048,
      "h": 2.4384,
      "dep": 0.07619999999999999,
      "quantity": 1,
      "costUnit": "cubic-yard"
    },
    "outputs": {
      "cubicYards": 0.7079211648,
      "cubicFeet": 0.7079211648,
      "cubicMeters": 0.7079211648,
      "area": 9.290304
    },
    "text": "Filling the area 3 in deep takes 0.93 yd³ of material."
  },
  "examples": [
    {
      "given": {
        "shape": "rectangle",
        "len": 3.048,
        "wid": 3.048,
        "dep": 0.07619999999999999,
        "quantity": 1,
        "costUnit": "cubic-yard"
      },
      "expect": {
        "cubicYards": 0.7079211648000001,
        "area": 9.290304
      },
      "source": "hand calculation in content.mdx: 10 × 10 × 0.25 = 25 ft³ = 25 ÷ 27 = 0.926 yd³; NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement: 1 cubic yard = 27 cubic feet, 1 short ton = 2,000 pounds. https://www.nist.gov/document/2026-nist-handbook-44-appendix-c"
    },
    {
      "given": {
        "shape": "rectangle",
        "len": 3.6576000000000004,
        "wid": 4.8768,
        "dep": 0.1016,
        "quantity": 1,
        "price": 45,
        "costUnit": "cubic-yard"
      },
      "expect": {
        "cubicYards": 1.8122781818880003,
        "total": 106.66666666666666
      },
      "source": "hand calculation in content.mdx: 12 × 16 × 4/12 = 64 ft³ = 2.370 yd³; × $45 = $106.67; NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement: 1 cubic yard = 27 cubic feet, 1 short ton = 2,000 pounds. https://www.nist.gov/document/2026-nist-handbook-44-appendix-c"
    },
    {
      "given": {
        "shape": "circle",
        "dia": 3.6576000000000004,
        "dep": 0.1016,
        "quantity": 2,
        "costUnit": "cubic-yard"
      },
      "expect": {
        "cubicYards": 2.135039933430153
      },
      "source": "hand calculation in content.mdx: π × 12² ÷ 4 = 113.10 ft²; × 4/12 ft × 2 = 75.40 ft³; NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement: 1 cubic yard = 27 cubic feet, 1 short ton = 2,000 pounds. https://www.nist.gov/document/2026-nist-handbook-44-appendix-c"
    },
    {
      "given": {
        "shape": "triangle",
        "a": 0.9144000000000001,
        "b": 1.2192,
        "c": 1.524,
        "dep": 0.30479999999999996,
        "quantity": 1,
        "costUnit": "cubic-foot",
        "price": 2
      },
      "expect": {
        "area": 0.5574182400000001,
        "cubicFeet": 0.169901079552,
        "total": 12
      },
      "source": "hand calculation in content.mdx: a 3-4-5 right triangle has area 3 × 4 ÷ 2 = 6 ft²; × 1 ft = 6 ft³; × $2 = $12; NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement: 1 cubic yard = 27 cubic feet, 1 short ton = 2,000 pounds. https://www.nist.gov/document/2026-nist-handbook-44-appendix-c",
      "tolerance": 1e-12
    },
    {
      "given": {
        "shape": "rectangle-border",
        "len": 6.096,
        "wid": 3.048,
        "border": 0.6096,
        "dep": 0.1016,
        "quantity": 1,
        "costUnit": "cubic-yard"
      },
      "expect": {
        "area": 12.634813440000002
      },
      "source": "hand calculation in content.mdx: (20 + 4) × (10 + 4) − 20 × 10 = 336 − 200 = 136 ft²; NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement: 1 cubic yard = 27 cubic feet, 1 short ton = 2,000 pounds. https://www.nist.gov/document/2026-nist-handbook-44-appendix-c"
    },
    {
      "given": {
        "shape": "circle-border",
        "dia": 3.6576000000000004,
        "inner": 2.4384,
        "dep": 0.1016,
        "quantity": 1,
        "costUnit": "cubic-yard"
      },
      "expect": {
        "area": 5.837270159203175
      },
      "source": "hand calculation in content.mdx: π × (12² − 8²) ÷ 4 = 20π = 62.83 ft²; NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement: 1 cubic yard = 27 cubic feet, 1 short ton = 2,000 pounds. https://www.nist.gov/document/2026-nist-handbook-44-appendix-c"
    }
  ],
  "sources": [
    "NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement: 1 cubic yard = 27 cubic feet; 1 short ton = 2,000 pounds. https://www.nist.gov/document/2026-nist-handbook-44-appendix-c"
  ],
  "related": [],
  "changelog": [
    {
      "date": "2026-09-29",
      "note": "Worked examples name a published reference for their rule."
    },
    {
      "date": "2026-10-01",
      "note": "The area row says it is for one shape."
    }
  ]
}
