# Description

The calc() function is used to apply math operations to length values.

This function has the form:

    calc(v1 operator v2)

# Arguments

Name | Description
--- | ---
v1 | Specifies the first value
operator | Specifies the operator. Value operators include: + Addition - Subtraction * Multiplication / Division mod Modulus
v2 | Specifies the second value

# Examples

This example shows how to calculate the length values for the `margin` property:

    p {
      margin:
        calc(1rem - 2px)
        calc(1rem - 1px)
    }

In this example, the top and bottom margins are calculated as two pixels less than the font size of the root element. The left and right margins as one pixel less than the font size of the root element.

# Browser Support

Firefox | IE | Chrome | Opera | Safari

# Miscellaneous Information

Defined In: | CSS3