Computed Field module

Computed Field is a very powerful CCK field module that lets you add custom computed field to your Drupal content types. These computed fields are populated with values that you define via PHP code. It is based on the Lotus Notes concept of the computed field widget available for Notes Forms.

You may draw on anything available to Drupal, including other fields, the current user, database tables, you name it.

You can also choose whether to store your computed field values in the database with other content fields, or have them "calculated" on the fly during node views (although you should note that Views use requires database stored values).

This module is available for Drupal 5 and 6.

You can download the module from Drupal.org.