SPFieldCalculated.Formula property

Gets or sets the formula that is used for calculation in the field.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public string Formula { get; set; }

Property value

Type: System.String
The formula.

Formulas are in the format of Microsoft Excel, but there are some limitations on the functions you can use and some subtleties in the syntax. Before using this property consult Calculated Field Formulas.