Garbage Bag Size Calculator

Enter your trash can's height and top opening dimensions to get the recommended bag width, bag length, estimated capacity in gallons, and the closest standard retail bag size.

Quick Facts

Bag width
Half the rim's circumference
A flat bag has two layers, so together they wrap the full circumference of a round can.
Capacity
π × r² × h ÷ 231 (round) or w × d × h ÷ 231 (rectangular)
231 cubic inches equal one US gallon.

Your Results

Calculated
Recommended bag width
-
Flat width to wrap the rim
Recommended bag length
-
Top to bottom plus tie overhang
Estimated capacity
-
Full-volume holding capacity
Closest standard size
-
Nearest common retail bag

Ready

Enter your can dimensions, then press Calculate.

About the Garbage Bag Size Calculator

This calculator turns a trash can's measurements into the trash bag dimensions that will actually fit it. It uses the same measure-and-convert method described by most bag manufacturers: measure the can's height and the diameter of its top opening (or the width and depth for a rectangular can), then derive the flat bag width, the bag length, the can's approximate holding capacity in gallons, and the closest standard retail bag size.

The formulas

For a round can with top diameter D and height H:

  • Bag width = (π × D) ÷ 2 — half the rim's circumference, since a flat bag's two layers together wrap the full circle when opened.
  • Bag length = H + (D ÷ 2) + overhang — the can's height, plus roughly a radius of extra material to cover the rounded bottom and rim, plus a few inches of overhang to gather and tie.
  • Capacity (gallons) = (π × r² × H) ÷ 231, where r = D ÷ 2 and 231 cubic inches equal one US gallon.

For a rectangular can with top width W and depth Dp, the calculator swaps the circle formulas for their rectangular equivalents:

  • Bag width = (2 × W + 2 × Dp) ÷ 2 = W + Dp — half the full perimeter of the opening.
  • Bag length = H + ((W + Dp) ÷ 2 ÷ 2) + overhang, using the average of width and depth in place of the diameter.
  • Capacity (gallons) = (W × Dp × H) ÷ 231, the box volume converted from cubic inches to gallons.

The calculated capacity is then matched to the closest common retail size — 4, 8, 13, 20, 30, 33, 39, 45, 55, or 65 gallons — so you know which box to reach for at the store.

Why the calculated capacity often runs larger than the printed bag size

A can's geometric volume assumes you fill it all the way to the brim. Retail bag sizes like "13 gallon" or "30 gallon" are nominal trade sizes that leave slack for gathering the bag, tying it off, and not overstuffing — so a bag rated somewhat below your can's full geometric volume will often still fit comfortably in practice.

How to get the best results

  • Measure the inside height of the can, not the outside, and measure to the top rim, not to a lid.
  • For round cans, measure the diameter straight across the widest point of the opening, not the circumference.
  • If the can tapers (wider at top than bottom), use the top opening measurement — that is what the bag has to stretch over.
  • Leave at least 2–4 inches of tie overhang so you have enough material to gather and knot the bag when it is full.

Frequently Asked Questions

How do I measure my trash can for the right bag size?
Measure the can's inside height and the diameter of the top opening (or the width and depth if it's rectangular). Bag width should be about half the rim's circumference, since a flat bag's two layers together wrap all the way around the can. Bag length should be the can's height plus roughly half the diameter, plus a few extra inches to gather and tie.
Why is my can's calculated capacity bigger than the bag size printed on the box?
Retail sizes like 13 gallon or 30 gallon are nominal trade sizes, not the exact geometric volume of the can. Manufacturers size bags conservatively so there's slack for gathering, tying, and not overfilling to the brim, so a can's full-volume capacity is often somewhat larger than the nominal bag rating that fits it comfortably.
How much overhang should I leave for tying the bag?
Most guides recommend 2 to 4 inches of extra length beyond the can's height and half-diameter allowance. That overhang folds over the rim to hold the bag in place and leaves enough material to gather and knot once it's full.
Does this work for rectangular or square trash cans?
Yes. Choose Rectangular and enter both the top width and top depth. The calculator then uses the full perimeter (2 × width + 2 × depth) for bag width and the product of width, depth, and height for volume, instead of the circle-based formulas used for round cans.