It costs a fortune to raise a child--$226,000 in today's dollars for a son and $247,000 for a daughter--according to calculations in a forthcoming book titled "Costs of Children."

The book, written by Lawrence Olson, is based on his research while he was with Data Resources Inc., which does economic analyses and projections.

Olson calculated the costs of raising a child from birth through age 22, assuming he or she goes to college, based on actual historic spending patterns for the average American family.

He concluded that for a male child born in 1980 the cost would be $226,000 in 1982 dollars, with a high proportion coming in the college years when food, education and many other costs rise sharply.

For a female child, the figure was $247,000. Olson, now a vice president of Sage Associates, an economic consulting firm here, said costs for transportation, recreation and entertainment for a girl proved in spending analyses to be higher on the average than for a boy, accounting for the higher total.

The calculations assumed that the child will go to a private college and pay for part of his or her own costs by means of student loans or earnings. The $226,000 and $247,000 figures included only the portion of school costs laid out by the parents.

Olson said the costs for a son would drop to $149,000 if the boy left the home and became financially independent at age 18.

Olson said his studies showed that children are cheaper to rear when there are more than one, partly because families share space and facilities families don't buy an extra television just because they have another child and partly because they seem to spend less on each child to make the money stretch.