To hang a swing from a single joist or beam it should be a 2 x 8 joist or 4 x 4 beam.
Where to hang a porch swing.
Allow for 3 to 4 feet of swinging arc in front of and behind the swing and it s wise to give yourself 2 feet on either side of the porch as well both for additional motion from the swing and so you can walk around it.
Use a measuring tape to determine where your porch swing would fit best.
How to locate the joists you can find the joists from the underside of the ceiling by using a stud finder.
Confirm you have enough space for your swing.
To hang your porch swing from a beam or single joist it should be a 4x4 beam or a 2x8 joist.
In other words hang your porch swing at a spot with at least three feet of space in front and in back of it.
If you cannot access to the attic cut a small hole or remove a piece of trim in the ceiling to measure the joist depth.