First, draw the octagon
the formula of area of an octagon is

where L is a side(4m) and we need to find the value of ap, then we can take the triangle
we use tangent to solve

where alpha is the reference angle, O the opposit side of the reference angle and A the adjacent side of the reference angle
if the reference angle is 135/2 we replace

and solve for ap

now we replace the values on the formula of the area of the octagon

then the area of the octagon is 77.28 square meters