ergonomicsworkplacedeveloper-guidecalculatorhealth

Building an Ergonomic Workstation Calculator from Body Measurement Data

· 5 min read · Martin Hejda

Ergonomic workstation design has a simple goal: arrange the workspace so the user can work without sustained awkward postures. The correct desk height, monitor distance, chair settings, and keyboard position all depend on body dimensions — primarily sitting height, eye height while seated, elbow height while seated, and popliteal height (back of knee to floor).

These dimensions can be predicted from height and weight, making it possible to generate personalized workstation recommendations from the same inputs a sizing application collects.


The key body dimensions

Popliteal height (ISO 7250-1 code 4.2.14): Distance from the floor to the underside of the knee when seated. Determines correct seat height — the seat should support the thighs without applying pressure to the underside of the knee.

Sitting height (ISO 7250-1 code 4.2.10): Crown of head to seat surface when seated upright. Used to calculate headroom requirements and monitor placement.

Eye height, seated (ISO 7250-1 code 4.2.11): Distance from seat to eye level when seated upright. Determines correct monitor top height.

Elbow height, seated (ISO 7250-1 code 4.2.15): Distance from seat to elbow when seated with upper arm vertical. Determines desk height for neutral wrist position.

Shoulder breadth, biacromial (ISO 7250-1 code 4.1.16): Width across the shoulder tips. Determines recommended shoulder room clearance.


Getting the dimensions from a prediction API

import requests

def predict_workstation_dimensions(
    gender: str,
    height_cm: float,
    weight_kg: float,
    region: str = "GLOBAL"
) -> dict:
    """
    Predict the body dimensions needed for workstation ergonomic calculations.
    All relevant dimensions are in the HEAD_FACE or TORSO/LEGS_FEET bundles.
    """
    response = requests.post(
        "https://dimensionspot-bodysize-engine.p.rapidapi.com/v1/predict",
        json={
            "input_data": {
                "input_unit_system": "metric",
                "subject": {"gender": gender, "input_origin_region": region},
                "anchors": {
                    "body_height": int(height_cm * 10),  # cm → mm
                    "body_mass": weight_kg
                }
            },
            "output_settings": {
                "calculation": {"target_region": region, "body_build_type": "CIVILIAN"},
                "requested_dimensions": {
                    "specific_dimensions": [
                        "popliteal_height",
                        "sitting_height",
                        "eye_height_sitting",
                        "elbow_height_sitting",
                        "shoulder_breadth_biacromial",
                        "shoulder_breadth_bideltoid",
                        "thigh_clearance"
                    ]
                },
                "output_format": {
                    "include_range_95": True,
                    "confidence_score_threshold": 60
                }
            }
        },
        headers={
            "X-RapidAPI-Key": "YOUR_API_KEY",
            "X-RapidAPI-Host": "dimensionspot-bodysize-engine.p.rapidapi.com"
        }
    )
    
    data = response.json()
    return data.get("body_dimensions", {})

Computing workstation recommendations

ISO 9241-5 (Workstation Layout and Postural Requirements) provides the ergonomic framework. The calculations below follow its principles:

from dataclasses import dataclass

@dataclass
class WorkstationRecommendation:
    """Recommended workstation settings for a specific individual."""
    
    # Chair
    seat_height_mm: tuple[int, int]         # (min, max) adjustable range
    seat_depth_mm: int                       # Recommended seat depth
    backrest_lumbar_height_mm: int           # Lumbar support position from seat
    
    # Desk
    desk_height_mm: tuple[int, int]          # (min, max) — prefer adjustable desk
    desk_height_fixed_mm: int                # If desk is fixed, this height
    
    # Monitor
    monitor_top_height_mm: int               # Top of screen height from floor
    monitor_eye_distance_mm: tuple[int, int] # (min, max) viewing distance
    monitor_tilt_degrees: int                # Slight downward tilt from horizontal
    
    # Keyboard
    keyboard_height_mm: int                  # Home row height from floor
    
    # Clearances
    thigh_clearance_mm: int                  # Minimum clearance under desk
    shoulder_width_clearance_mm: int         # Recommended elbow-to-elbow clearance

SHOE_HEIGHT_MM = 20  # Standard flat shoe height allowance

def compute_workstation_recommendations(
    body_dims: dict,
    shoe_height_mm: int = SHOE_HEIGHT_MM
) -> WorkstationRecommendation:
    """
    Compute personalized workstation recommendations from predicted body dimensions.
    
    All inputs from body_dims are in mm (the API output unit).
    """
    def mm(dim_id: str) -> int:
        """Extract mm value from prediction result."""
        dim = body_dims.get(dim_id)
        if not dim:
            raise ValueError(f"Required dimension not found: {dim_id}")
        return int(dim["value"])
    
    popliteal_h = mm("popliteal_height")
    eye_h_sitting = mm("eye_height_sitting")
    elbow_h_sitting = mm("elbow_rest_height")
    shoulder_breadth = mm("biacromial_breadth")
    thigh_clearance = mm("thigh_clearance")
    
    # --- SEAT HEIGHT ---
    # Seat height = popliteal height + shoe height
    # Range: ±30mm for user preference
    seat_h_ideal = popliteal_h + shoe_height_mm
    seat_height_range = (seat_h_ideal - 30, seat_h_ideal + 30)
    
    # --- DESK HEIGHT ---
    # Desk height should position keyboard at elbow height when seated
    # Elbow height sitting is measured from seat surface, so:
    # Desk height = seat_height + elbow_height_sitting - 30mm (for keyboard thickness)
    keyboard_from_floor = seat_h_ideal + elbow_h_sitting - 30
    desk_height_range = (keyboard_from_floor - 25, keyboard_from_floor + 50)
    
    # --- MONITOR ---
    # Eye height from floor = seat_height + eye_height_sitting
    eye_h_from_floor = seat_h_ideal + eye_h_sitting
    # Top of screen should be at or slightly below eye level
    monitor_top = eye_h_from_floor - 20  # Slight downward gaze is comfortable
    # Viewing distance: 500–700mm recommended (eye strain reduction)
    
    # --- THIGH CLEARANCE ---
    # Minimum clearance under desk = thigh_clearance + 30mm margin
    min_thigh_clearance = thigh_clearance + 30
    
    return WorkstationRecommendation(
        seat_height_mm=seat_height_range,
        seat_depth_mm=popliteal_h,  # Seat depth should equal popliteal height
        backrest_lumbar_height_mm=int(popliteal_h * 0.4),  # ~40% of popliteal height
        desk_height_mm=desk_height_range,
        desk_height_fixed_mm=int(keyboard_from_floor),
        monitor_top_height_mm=monitor_top,
        monitor_eye_distance_mm=(500, 700),
        monitor_tilt_degrees=15,
        keyboard_height_mm=keyboard_from_floor,
        thigh_clearance_mm=min_thigh_clearance,
        shoulder_width_clearance_mm=int(shoulder_breadth + 100)  # 50mm each side
    )

def format_recommendations(rec: WorkstationRecommendation) -> dict:
    """Format recommendations for display."""
    def cm(mm_val: int) -> str:
        return f"{mm_val / 10:.0f} cm"
    
    def cm_range(mm_range: tuple) -> str:
        return f"{mm_range[0] / 10:.0f}{mm_range[1] / 10:.0f} cm"
    
    return {
        "chair": {
            "seat_height": cm_range(rec.seat_height_mm),
            "seat_depth": cm(rec.seat_depth_mm),
            "lumbar_support_height": f"{rec.backrest_lumbar_height_mm / 10:.0f} cm from seat"
        },
        "desk": {
            "height_adjustable_range": cm_range(rec.desk_height_mm),
            "fixed_desk_recommended_height": cm(rec.desk_height_fixed_mm),
            "keyboard_home_row_height": cm(rec.keyboard_height_mm),
            "minimum_thigh_clearance": cm(rec.thigh_clearance_mm)
        },
        "monitor": {
            "top_of_screen_height": cm(rec.monitor_top_height_mm),
            "viewing_distance": "50–70 cm",
            "tilt": f"{rec.monitor_tilt_degrees}° downward from horizontal"
        },
        "clearances": {
            "shoulder_width_clearance": cm(rec.shoulder_width_clearance_mm)
        }
    }

Complete ergonomic profile function

def ergonomic_profile(
    gender: str,
    height_cm: float,
    weight_kg: float,
    region: str = "GLOBAL",
    has_adjustable_desk: bool = True
) -> dict:
    """
    Generate a complete personalized ergonomic workstation profile.
    """
    body_dims = predict_workstation_dimensions(gender, height_cm, weight_kg, region)
    
    rec = compute_workstation_recommendations(body_dims)
    formatted = format_recommendations(rec)
    
    # Add population percentile context
    # (Is this person tall/short relative to their population?)
    standing_h_mm = int(height_cm * 10)
    
    result = {
        "workstation_recommendations": formatted,
        "input_profile": {
            "gender": gender,
            "height_cm": height_cm,
            "weight_kg": weight_kg,
            "region": region
        },
        "key_body_dimensions": {
            dim_id: {
                "value_cm": round(dims["value"] / 10, 1),
                "confidence_score": dims.get("confidence_score")
            }
            for dim_id, dims in body_dims.items()
            if dims.get("value")
        },
        "notes": []
    }
    
    if not has_adjustable_desk:
        result["notes"].append(
            f"Fixed desk recommendation ({formatted['desk']['fixed_desk_recommended_height']}) "
            "is optimized for keyboard work. Consider a monitor arm for screen height adjustment."
        )
    
    # Flag if user is at population extremes (>95th or <5th percentile in height)
    if height_cm > 193 or height_cm < 155:
        result["notes"].append(
            "Your height is outside the typical range. Standard adjustable desks "
            "(63–130cm) may not cover your full recommended range. Verify the desk "
            "can reach your recommended height."
        )
    
    return result

Example output

For a 175cm, 72kg man in a European office:

{
  "chair": {
    "seat_height": "40–46 cm",
    "seat_depth": "40 cm",
    "lumbar_support_height": "16 cm from seat"
  },
  "desk": {
    "height_adjustable_range": "68–76 cm",
    "fixed_desk_recommended_height": "73 cm",
    "keyboard_home_row_height": "73 cm",
    "minimum_thigh_clearance": "16 cm"
  },
  "monitor": {
    "top_of_screen_height": "116 cm",
    "viewing_distance": "50–70 cm",
    "tilt": "15° downward from horizontal"
  }
}

Use cases

Corporate HR tools: Companies outfitting remote workers or new offices can generate personalized ergonomic checklists for employees. Employees enter their height and weight; the tool provides a checklist they can share with facilities or use when setting up their home office.

Office furniture e-commerce: A desk or chair retailer can recommend specific products based on the user’s ergonomic requirements. “Based on your height, you need a desk adjustable to 73–80cm. Here are the models that cover that range.”

Occupational health applications: For employers with mandatory ergonomic assessment requirements (common in EU member states under Directive 90/270/EEC on display screen equipment), an automated first-pass assessment from employee body data reduces the burden on occupational health professionals.


Workstation ergonomics is a dimension where body prediction is particularly valuable: the stakes are real (chronic musculoskeletal issues from sustained poor posture are genuinely harmful), the measurements users need (popliteal height, eye height while seated) are not numbers they know, and the calculation from height and weight is sufficiently accurate for practical recommendations.

Try DimensionsPot

Free tier — 100 requests/month, no credit card required.

Get API on RapidAPI