---
title: "estimatedCost(of:)"
framework: coreml
role: symbol
role_heading: Instance Method
path: "coreml/mlcomputeplan-1w21n/estimatedcost(of:)"
---

# estimatedCost(of:)

Returns the estimated cost of executing a MLProgram operation.

## Declaration

```swift
func estimatedCost(of operation: MLModelStructure.Program.Operation) -> MLComputePlan.Cost?
```

## Parameters

- `operation`: A MLProgram operation

## Return Value

Return Value The estimated cost of executing the operation.

## See Also

### Getting the estimated cost

- [MLComputePlan.Cost](coreml/mlcomputeplan-1w21n/cost.md)
