Create variables for the composition of a service value

Guys,
Is it possible for me to create variables for the composition of a service value? For example, I’m creating a mobilization service that should be composed of the variables: Travel, accommodation and vehicle rental. They will be influenced by different costs. It’s hard to explain, but here’s a schematic below:
Trip offset = Entered distance value * a predefined constant with the offset cost
Hosting = entered value of the number of days * a predefined constant with the cost of hosting
Etc…
The cost of the service would be = Travel + accommodation + vehicle rental