Skip to Content
Estimating User GuidePricing the Bill Using WorksheetsAdvanced Functions

Unlocking the Power of Functions in Methvin: Advanced Equations, Variables, and Automated Pricing for Smarter Cost Estimation

Methvin provides a variety of functions to streamline calculations, whether you’re managing complex construction projects or handling simpler measurements. These functions are designed to improve accuracy and simplify your workflow. Methvin supports a wide range of functions, including basic arithmetic, advanced JavaScript-based calculations, and date functions for managing project timelines. These functions are categorized into the following sections:

  1. Quick Functions
  2. JavaScript Math Functions
  3. JavaScript Date Functions
  4. Project Financing Example

1. Quick Functions

These are commonly used functions for quick calculations.

Density of Mild steel

  1. [skg]: Returns the density of mild steel in kg/m³.
    • Example: [skg] returns 7850.
  2. [slb]: Returns the density of mild steel in lb/ft³.
    • Example: [slb] returns 490.636.

Mathematical Constants

  1. [PI]: Returns the mathematical constant pi (π), approximately 3.14159.
    • Example: [PI] returns 3.14159.

Using Global Variables in Equations

Global variables are user-defined values set within the estimating application. These variables can be seamlessly utilized in the Takeoff Tool’s equation field, allowing for automated calculations based on predefined project-wide values.

By incorporating global variables, users can efficiently standardize and automate measurements that share a common value across multiple takeoff elements.

Examples of Global Variables:
  1. [CD_GV] – Contract Duration
  2. [NF_GV] – Number of Floors
  3. [GPA_GV] – Gross Plan Area
  4. [WH_GV] – Working Hours on Site

This functionality enhances consistency and accuracy in estimating, ensuring that key project parameters are applied uniformly across all relevant calculations.

Power Calculation

  1. Computes the power of a number.
    • Example: 2^3 returns 8

Square Root

  1. Computes the square root of a number.
    • Example: 4^(1/2) returns 2.

Conditional Statements

  1. Performs logic-based outcomes based on conditions.
    • Example: if(10 > 5) 55 else 66 returns 55.

Bill Item Quantity

  1. [qty]: Returns the quantity associated with a bill item.
    • Example: [qty] returns 100 (or the specified quantity).

2. JavaScript Math Functions

These functions utilize JavaScript for advanced mathematical operations.

Basic Math Functions

  1. E: Euler’s constant, approximately 2.718.
    • Example: Math.E returns 2.718.
  2. PI or [PI]: Returns the mathematical constant pi (π).
    • Example: Math.PI returns 3.14159.

Logarithmic Functions

  1. LN(x): Returns the natural logarithm of x.
    • Example: Math.LN(2) returns 0.693.
  2. log(x): Computes the natural logarithm of x.
    • Example: Math.log(10) returns 2.3026.
  3. LOG(x)E: Calculates the logarithm of x in base E.
    • Example: Math.LOG(2) returns 0.3010.

Rounding Functions

  1. ceil(x): Rounds x up to the nearest integer.
    • Example: Math.ceil(2.1) returns 3.
  2. floor(x): Rounds x down to the nearest integer.
    • Example: Math.floor(2.9) returns 2.
  3. round(x): Rounds x to the nearest integer.
    • Example: Math.round(2.5) returns 3.
  4. toFixed(n): Rounds x to n decimal places.
    • Example: 2.567.toFixed(2) returns 2.57.

Other Math Functions

  1. min(x, y, z, …): Returns the smallest value from a list of arguments.
    • Example: Math.min(0, 150, 30, -200, -8) returns -200.
  2. max(x, y, z, …): Returns the largest value from a list of arguments.
    • Example: Math.max(0, 150, 30, 20, -8) returns 150.
  3. SQRT(x): Computes the square root of x.
    • Example: Math.SQRT(9) returns 3.
  4. sin(x): Calculates the sine of an angle in radians.
    • Example: Math.sin(Math.PI / 2) returns 1.

3. JavaScript Date Functions

These functions are used to manage contract-related calculations and project timelines.

Contract Start and End Dates

  1. SD1: Define the contract start date.
    • Example: SD = 10/01/2017 sets the start date to 10th January 2017.
  2. ED1: Define the contract end date.
    • Example: ED = 24/05/2017 sets the end date to 24th May 2017.

Contract Duration

  1. Calculate the total duration of the contract in weeks.
    • CD1 = (([ED] - [SD]) / 1000 / 60 / 60 / 24 / 365.242 * 12 * 4.33).toFixed(2)
      This returns the duration in weeks, e.g., 19.07.

4. Project Financing Example

Contract Interest Cost Calculation Example

The table below demonstrates how to calculate the financing cost for a construction project, including initial principal, monthly increase, and interest over the repayment period.

Example of a pricing worksheet for calculating contract interest costs:

DescriptionResource RateUnitVariableEquationValueAmount
Clients financing variables11
Annual Interest RateAIR[BLR_GV]%0
Client initial Principal costs11
Initial PrincipalIP[LAC_GV]1,600,000
Client monthly increase cost of build11
Design and Consultants’ costs[TDC_GV]9,300,000
Contractors build cost[CEB_GV]60,000,000
Clients provisions[CPC_GV]11,367,600

Total client cost less land acquisition cost

CC

[TDC_GV] + [CEB_GV] +
[CPC_GV]

80,667,600
Monthly IncreaseMI[CC] / [CPD_GV]1,390,821
Client cost of interest11
Number of Repayment PeriodsNOR[CPD_GV]58
Monthly RateMIR[AIR] / 12
Total InterestInterest1sum

FOR(0, [NOR]): { answer +=
([IP] + ([MI] × count)) ×
[MIR]

7,972,7557,972,755

Breakdown of Key Calculations

  1. Initial Principal (IP): The land acquisition cost [LAC_GV] is the starting principal.

    • Value: 1,600,000
  2. Annual Interest Rate (AIR): The yearly interest rate is 4%, converted into a monthly rate:

    1. Formula: [AIR] / 12
      • Value: 0.0033333
  3. Total Client Cost (CC): Sum of consultant, contractor, and provision costs.

    1. Formula: [TDC_GV] + [CEB_GV] + [CPC_GV]
      • Value: 80,667,600
  4. Monthly Increase (MI): Monthly construction cost increase based on repayment period.

    1. Formula: [CC] / [CPD_GV]
      • Value: 1,390,820.69
    2. Total Interest Calculation: Using a loop formula:

      FOR(0, [NOR]): { answer += ([IP] + ([MI] * count)) * [MIR] }

      • Total Interest Value: 7,972,755.33
Last updated on