Number of equal sides (#sides) requires a whole integer from 3 to 1,000 (step="1"), because at least 3 straight edges are required to enclose a 2D polygon. Side length (#side) requires a positive finite number from 1e-09 to 1,000,000,000. If you check the formula on a handheld calculator set to Degree (DEG) mode, evaluate tan(180° / n) rather than tan(π / n), since JavaScript's Math.tan operates in radians.
When your geometry task involves unequal sides, curved boundaries, or 4-sided layouts, pair this tool with our Polygon Area Calculator for irregular polygons defined by (x, y) vertex coordinates via the Shoelace theorem, the Triangle Area Calculator for non-equilateral triangles, the Rectangle Area Calculator and Trapezoid Area Calculator for 4-sided layouts, or the Circle Area Calculator and Circumference Calculator for circular limits.