Plaintiff who did not recover more in damages than a rejected pre-trial 998 offer in an employment discrimination case was not entitled to attorney fees for work done after the §998 offer was rejected. Section 998 expressly requires the court to exclude post-offer costs in determining whether the plaintiff has obtained a more favorable judgment than the offer. So the trial court properly excluded anticipated attorney fees for a later appeal in calculating whether the 998 offer exceeded plaintiff’s recovery.