there will be a legal definition where you live, for people/businesses who want to sell to the public, as part of trade description legislation.
Here, for example, there is extensive legislation on it. Here's a small extract to give you some idea of how detailed it can be:
"Free range systems: additional housing requirements
Paragraph 17 of Schedule 1 to the Welfare of Farmed Animals (England) Regulations 2007 states:
17. Animals not kept in buildings must, where necessary and possible, be given protection from adverse weather conditions, predators and risks to their health and must, at all times, have access to a well-drained lying area.
Paragraph 7 of Schedule 2 to the Welfare of Farmed Animals (England) Regulations 2007 states:
7. If laying hens have access to open runs –
(a) there must be several popholes giving direct access to the outer area, at least 35 cm high and 40 cm wide, and extending along the entire length of the building; and in any case, a total opening of 2 m must be available per group of 1,000 hens; and
(b) the open runs must be – (i) of an area appropriate to the stocking density and to the nature of the ground, in order to prevent any contamination; and (ii) equipped with shelter from adverse weather conditions and predators and, if necessary, drinking troughs."
https://www.gov.uk/government/publications/poultry-on-farm-welfare/poultry-welfare-recommendations excerpt from heading between paras 145 and 146
If you read it all carefully you'll see it permits chickens and eggs to be labelled 'free range' even though they may never even set foot outdoors. They just have to be given access to the outdoors. They don't have to use it, and what that 'outdoors' actually looks like can be very far removed from the image of green pasture or light woodland that typically figures on the advertising blurb for free range this or that.
Search your state government website for the rules where you live.