Engineering ToolBox - Resources, Tools and Basic Information for Engineering and Design of Technical Applications!

Circles within a Rectangle - Calculator

Calculate the maximum number of circles within a rectangle - can be used to calculate the numbers of pipes or wires in a conduit or similar.

The calculator below estimates the maximum number of circles that may fit within a rectangle. The calculator can be used to calculate

  • the number of pipes - or wires - that fits within a conduit or similar applications

Input the rectangle inside dimensions - height and width and the circles outside diameters.

Default values are for 0.5 inch circles inside a 10 inch x 10 inch square. The calculator is generic and any kind of units can be used - as long as the same units are used for all values.

Rectangular Pattern



Number of circles within a rectangle - rectangular pattern

Rectangular Pattern - Circle Coordinates

Copy and paste the circle center coordinates to your application. x = 0 and y = 0 is top left corner of rectangle. 

x y

Tip! - the values can be adapted and modified in excel or in a text editor for use in a CNC G-code generator or similar.

Triangular Pattern



Number of circles within a rectangle - triangular pattern

Triangular Pattern - Circle Coordinates

Copy and paste the circle center coordinates to your application. x = 0 and y = 0 is top left corner of rectangle.

x y

Be aware! - The algorithm is quite simple - switching rectangle width and height may influence the number calculated. Switching the input values above changes the layout and gives


Note! - with some combinations of rectangular shapes and circle sizes - one or two more circles - or even more - may be added with a modified layout of the circles. In the default triangular example above - two more circles can be added in between if the left and right bottom circles are moved to the left and right border. The algorithm used for the calculation is quite simple and may underestimate the number of circles in some cases. 

Related Topics

  • Electrical

    Electrical engineering with units, amps and electrical wiring. Wire gauges, electrical formulas, motors and more.
  • Mathematics

    Mathematical rules and laws - numbers, areas, volumes, exponents, trigonometric functions and more.

Related Documents


Search is the most efficient way to navigate the Engineering ToolBox.

Engineering ToolBox - SketchUp Extension - Online 3D modeling!

3D Engineering ToolBox Extension to SketchUp - add parametric components to your SketchUp model

Add standard and customized parametric components - like flange beams, lumbers, piping, stairs and more - to your Sketchup model with the Engineering ToolBox - SketchUp Extension - enabled for use with older versions of the amazing SketchUp Make and the newer "up to date" SketchUp Pro . Add the Engineering ToolBox extension to your SketchUp Make/Pro from the Extension Warehouse !

Translate this Page

Translate this page to Your Own Language .

About the Engineering ToolBox!

Privacy Policy

We don't collect information from our users. More about

We use a third-party to provide monetization technologies for our site. You can review their privacy and cookie policy here.

You can change your privacy settings by clicking the following button: .


This page can be cited as

  • The Engineering ToolBox (2014). Circles within a Rectangle - Calculator. [online] Available at: [Accessed Day Month Year].

Modify the access date according your visit.

3D Engineering ToolBox - draw and model technical applications! 2D Engineering ToolBox - create and share online diagram drawing templates! Engineering ToolBox Apps - mobile online and offline engineering applications!

Unit Converter