A standard pullup bar varies between 2 and 4 feet in length.
You will want to make sure you have enough clearance between the bar and where you're mounting it to do a full pullup, which will depend on your height and the type of mount you're using (wall, door, ceiling, or freestanding).
Ceiling-mounted, wall-mounted, and freestanding pullup bars will allow you to have the greatest range of motion when doing full pullups and other exercises that require more movement.