GET /v1/percentagePercentage calculator
Format Utils lf-format-utils
Works out percentage sums, like what one number is as a share of another. Percentage calculator
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
mode | string | Yes | percent_of, percent_change, or value_from_percent |
x | number | No | First operand |
y | number | No | Second operand |
Response Schema
result (number): Computed value
mode (string): Mode used
formula (string): Human-readable formula
cURL Example
curl 'https://lf-format-utils.laminarforge.dev/v1/percentage?mode=<mode>' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/percentage'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'mode': '<mode>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())