If you want the output of the calculation to be...
Examples
a number
Use a calculated field
BMI, Age
a date
Use @CALCDATE
Find date 30 days after input date, etc.
text
Use @CALCTEXT
Check the value of several fields at once- for instance, if screening question answers indicate a participant is eligible for a study
(Note: some text below is taken from the REDCap Help & FAQ page)
Calculated fields can only return numerical values. You should use a calculated field any time you want REDCap to give you back a number, such as calculating a BMI or the number of days between two dates. Note that it is possible to use dates as input to calculated fields, as long as the result will be number (such as age), and not another date.
@CALCTEXT is an action tag you can use on a text field that can return a text value. For example, you can use this if you have an "if" statement and you want REDCap to display the word "TRUE" if the result is true and "FALSE" if the result is false. @CALCTEXT always returns text.
@CALCDATE is an action tag you can use on text field
Calculations in REDCap are generally performed only when a form containing the calculation (whether a calculated field, a @CALCDATE or @CALCTEXT) is opened for that record. Use Rule H to update the calculations in all records without you having to open each record individually.
This is important when:
Adding a new calculation (calculated field, @CALCDATE, and @CALCTEXT) to a project that already has records.
Updating an existing calculation
If any of the fields used in the calculation come from other forms. The input form may be updated, but if the form containing the calculation has not been opened since, then the calculation may have an old value.
If your project contains calculations, it is a good idea to run Rule H periodically, especially before doing a data export, to be sure your calculations are up-to-date in each record.
Run Rule H
On the left hand navigation bar, click the "Data Quality Rules".
On the line for Rule H, click the Execute button.
Once it has run, click on the tiny "View" link.
In the resulting pop-up box, click "Fix calcs now".
If this is a new calculation, do a quick manual check that the answers are correct- it is