# Lighting Calculator: How Many Lights, Lux, Fixture Layout (`jumblemog/lighting-calculator`) Actor

How many light fixtures a room needs from plain text: luminaire count and grid for a target lux or foot-candles, spacing, uniformity, watts and an illuminance map; or the light level of a given layout.

- **URL**: https://apify.com/jumblemog/lighting-calculator.md
- **Developed by:** [Jumble Mog](https://apify.com/jumblemog) (community)
- **Categories:** AI, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Lighting Calculator: How Many Lights, Lux, Fixture Layout

**How many light fixtures a room needs, and where they go, from one line of text.** Describe the room and the light (`office 10 x 8 m, 3 m ceiling, 2x2 LED panels 3600 lm 32 W, 500 lux` or `how many 6 inch downlights for a 15 x 12 ft kitchen with 8 ft ceilings`) and you get back:

- **The luminaire count and grid**: rows and columns, the spacing both ways, the distance from the walls and every luminaire's position.
- **The light it gives**: average, minimum and maximum illuminance on the work plane in lux and foot-candles, uniformity, the reflected share, and the utilization factor.
- **Power**: total lumens and watts, and the lighting power density in W/m² and W/ft² (for energy code checks).
- **Targets by room type**: say `office`, `classroom`, `kitchen`, `warehouse`, `retail` or one of 50 more and the usual light level and uniformity are used; or give `500 lux` or `50 fc`.
- **Checks of a layout you already have**: `office 6 x 4 m with 4 panels` or `3 rows of 4` gives the light level and says if it's short.
- **A chart**: an illuminance map of the room with the luminaires on it and the task area marked.

It's made for:

- Electricians and lighting contractors quoting how many fixtures a job needs.
- Homeowners and remodelers planning recessed lights for a kitchen, living room or garage.
- Facility managers and energy auditors replacing fluorescent troffers or metal-halide high bays with LED and checking light levels and W/ft².
- Architects, interior designers and students sizing lighting early, and AI agents that need correct fixture counts instead of a lumens-per-square-foot guess.

![An illuminance map made by this Actor for a 10 × 8 m office lit to 500 lux: 18 2x2 LED panels in 3 rows of 6, brightest in the middle at about 670 lux and dimmer toward the walls, with the task area 0.5 m in from the walls dashed](https://api.apify.com/v2/key-value-stores/Km5b4PG3kYHdZSb1E/records/lighting-calculator-example.png?signature=1b4JdEeUKJzoMyrGitt8h)

### How to use it

1. Write **Rooms**, one per entry. The form has examples.
2. Optionally set the **Units** for numbers written without one (metric by default).
3. Click **Start**. Each room is a row in the results, with its summary, chart and report.

#### What you can write

| You write | It means |
|---|---|
| `10 x 8 m`, `15 x 12 ft`, `300 sq ft` | The room's size (an area alone is taken as a 5:4 rectangle) |
| `9 ft ceiling`, `3 m ceiling`, `mounted at 9 m` | Ceiling height (8 ft or 2.7 m if not given), or the height of hanging luminaires |
| `500 lux`, `50 fc`, `office`, `kitchen`, `warehouse` | The target light level, or the room type that sets it |
| `2x2 panel`, `2x4 troffer`, `4 ft tube`, `strip lights`, `6 inch downlight`, `4 inch downlight`, `recessed`, `high bay`, `low bay`, `60W equivalent bulbs`, `pendant`, `track`, `spot` | A luminaire preset (typical LED lumens and watts) |
| `3600 lm 32 W`, `2-lamp`, `beam angle 60` | The luminaire's own lumens, watts, lamps and beam |
| `with 4 panels`, `3 rows of 4`, `2 60W equivalent bulbs` | A layout to check instead of design |
| `reflectances 80/50/20`, `dark walls`, `white room` | Ceiling, wall and floor reflectance (70/50/20 if not given) |
| `maintenance factor 0.7`, `uniformity 0.6`, `work plane 0.85 m` | Light loss over time, evenness asked for, task height |

The same as an object: `{"length": "8 m", "width": "6 m", "ceilingHeight": "3 m", "target": 300, "lumens": 4000, "watts": 30, "beamAngle": 90, "reflectances": [80, 50, 20]}` or `{"length": 40, "width": 25, "units": "us", "space": "workshop", "fixture": "strip", "rows": 3, "columns": 5}`.

### Examples

- `office 10 x 8 m, 3 m ceiling, 2x2 LED panels 3600 lm 32 W, 500 lux` → 18 panels in 3 rows of 6 (1.67 × 2.67 m apart), 568 lux average, uniformity 0.67; 576 W, 7.2 W/m².
- `how many 6 inch downlights for a 15 x 12 ft kitchen with 8 ft ceilings` → 8 downlights in 2 rows of 4, 30 fc average (target 28); 88 W.
- `warehouse 60 x 30 m, high bays 20000 lm 150 W mounted at 9 m, 200 lux` → 25 high bays in 5 rows of 5, 204 lux, uniformity 0.51; 2.1 W/m².
- `classroom 30 x 25 ft, 9 ft ceiling, 2x4 troffers` → 10 troffers in 2 rows of 5, 50 fc average (target 46), uniformity 0.60.
- `living room 20 x 16 ft, recessed lights` → 8 recessed lights in 2 rows of 4, 15 fc average.
- `bedroom 12 x 11 ft with 2 60W equivalent bulbs` → 8 fc average, a little under the 9 fc (100 lux) usually asked for a bedroom.

### How-to examples

Each example is a complete input; the results are from runs of the Actor (also listed under **Examples**).

#### How to calculate how many light fixtures a room needs

```json
{"requests": ["office 10 x 8 m, 3 m ceiling, 2x2 LED panels 3600 lm 32 W, 500 lux"]}
```

Result: 18 panels in 3 rows of 6 (1.67 × 2.67 m apart), 568 lux average, uniformity 0.67; 576 W, 7.2 W/m².

#### How to plan recessed downlights for a kitchen

```json
{"requests": ["how many 6 inch downlights for a 15 x 12 ft kitchen with 8 ft ceilings"]}
```

Result: 8 downlights in 2 rows of 4, 30 fc average against a 28 fc target; 88 W.

#### How to lay out high bay lights in a warehouse

```json
{"requests": ["warehouse 60 x 30 m, high bays 20000 lm 150 W mounted at 9 m, 200 lux"]}
```

Result: 25 high bays in 5 rows of 5, 204 lux, uniformity 0.51; 2.1 W/m².

#### How to let an AI agent plan lighting

Add this Actor to the [Apify MCP server](https://mcp.apify.com) with `https://mcp.apify.com/?tools=jumblemog/lighting-calculator`. The agent describes the room and the light in one line and answers with the fixture count, the grid spacing, the light level and the watts.

### FAQ

**Where do the target light levels come from?** From the room type (`office`, `classroom`, `kitchen`, `warehouse`, `retail` or one of 50 more), which sets the usual level and uniformity, or from the lux or foot-candles you give.

**Can I check lights I already have?** Yes: `bedroom 12 x 11 ft with 2 60W equivalent bulbs` gives 8 fc average, a little under the 9 fc usually asked for a bedroom.

**How accurate is it?** It uses generic photometry, so a specific product can differ by 10-20%. Use DIALux, AGi32 or the maker's layout service for a final design.

**Does it account for reflected light and dirt?** Yes: reflected light by the Sumpner relation, and a maintenance factor (0.8 by default) for dirt and lumen loss.

### Input

| Field | What it is |
|---|---|
| `requests` | The rooms, as lines of text or objects (up to 200 per run) |
| `units` | For numbers without a unit: `metric` (m, lux) or `us` (ft, foot-candles) |
| `charts` | Draw an illuminance map for each room (default on) |

### Output

One dataset item per room, also saved together in the run's `OUTPUT` record:

```json
{
  "request": 1, "status": "ok", "type": "room", "title": "Office 10 × 8 m",
  "summary": "18 × 3,600 lm luminaires (3 rows × 6, spacing 1.67 × 2.67 m) light the room to 568 lux average (target 500, min 383, uniformity 0.67); 576 W, 7.2 W/m².",
  "lighting": {"target": 500, "average": 567.7, "minimum": 383, "maximum": 670.5, "uniformity": 0.675, "uniformityRequired": 0.6,
               "roomAverage": 532.3, "averageFootCandles": 52.7, "indirect": 111.4, "utilizationFactor": 0.822,
               "maintenanceFactor": 0.8, "totalLumens": 64800, "totalWatts": 576, "powerDensity": 7.2, "powerDensityPerFt2": 0.669},
  "layout": {"fixtures": 18, "rows": 3, "columns": 6, "spacingAlongLength": 1.667, "spacingAlongWidth": 2.667,
             "offsetFromEndWalls": 0.8333, "offsetFromSideWalls": 1.333, "spacingToMountingHeight": 1.19},
  "fixture": {"name": "2x2 panel", "lumens": 3600, "watts": 32, "efficacy": 112, "beamAngle": 120, "uplight": 0},
  "room": {"length": 10, "width": 8, "area": 80, "ceilingHeight": 3, "mountingHeight": 3, "workPlane": 0.75,
           "reflectances": [70, 50, 20], "roomCavityRatio": 2.53, "space": "office"},
  "luminaires": [{"x": 0.8333, "y": 1.333}, {"x": 2.5, "y": 1.333}, "..."],
  "imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/001-Office-10-8-m.png"
}
```

Every item also has `units`, `warnings`, `notes` (the method and every assumed value), a Markdown `report` and links to the chart and report. A request that can't be computed has `"status": "failed"` and the reason in `error`, and isn't billed.

### How it works

1. **Direct light**: each luminaire is a point source with a cos^n intensity distribution (n = 1 for a flat panel or bulb, higher for a downlight or a narrow beam, from the beam angle) whose total equals its lumens. Illuminance at each point of a 40-point grid over the work plane is E = I(θ)·cos θ / d², summed over every luminaire.
2. **Reflected light**: the flux reaching the work plane and walls is reflected by their reflectances, and the integrating-sphere (Sumpner) relation spreads it over the room: E = first-reflected flux / (total surface area × (1 − average reflectance)).
3. **Maintained values**: everything is multiplied by the maintenance factor (0.8 by default) for dirt and lumen loss over time.
4. **Task area**: average, minimum and uniformity (minimum ÷ average) leave out a 0.5 m band along the walls, as EN 12464-1 does.
5. **Design**: the even grid (half a spacing to each wall) with the fewest luminaires whose average reaches the target and whose uniformity reaches the room type's (0.6 for offices and classrooms, 0.4 for corridors and warehouses, 0.3 at home).

### Pricing

You pay one low price per room, at the price shown on this page. The chart and report are included. Requests that can't be computed are never charged. If you set a maximum cost per run, the Actor stops before a request that wouldn't fit.

### Speed

A room takes a few milliseconds to a quarter of a second (large warehouses). A run through the API answers in about 10 seconds, including the cloud container starting.

### Tips and limits

- **Generic photometry**: real luminaires have their own light distribution (IES files); results for a specific product can differ by 10-20%. Use DIALux, AGi32 or the maker's layout service for a final design.
- **Empty rooms**: furniture, shelving and partitions block light; in a warehouse with tall racks, light the aisles separately.
- **Presets** are typical LED products; give your luminaire's lumens and watts when you know them.
- **Uniformity** is what the grid achieves on an open floor; the spacing-to-mounting-height ratio is reported too.
- **Limits**: 200 rooms per run; rooms up to 50,000 m²; up to 400 luminaires designed (2,000 checked).

### For AI agents and developers

This Actor works with the [Apify MCP server](https://mcp.apify.com), so AI agents can call it as a tool. Pass `requests` as plain text and read `summary`, `layout`, `lighting`, `luminaires` and `warnings`. A direct API call that waits for the answer:

```bash
curl -X POST "https://api.apify.com/v2/acts/jumblemog~lighting-calculator/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"requests": ["conference room 20 x 14 ft, 9 ft ceiling, 4 inch downlights"]}'
```

`run-sync` instead returns the run's `OUTPUT`: the status, the counts and every result as JSON.

In Python, with the `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("jumblemog/lighting-calculator").call(run_input={
    "requests": [{"length": 40, "width": 25, "units": "us", "space": "workshop", "fixture": "strip",
                  "rows": 3, "columns": 5}],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["summary"])
```

### Credits

- Math: [NumPy](https://numpy.org) (BSD-3-Clause).
- Charts: [Vega-Lite](https://vega.github.io/vega-lite/) and [vl-convert](https://github.com/vega/vl-convert) (BSD-3-Clause), with the [Inter](https://rsms.me/inter/) font (SIL Open Font License).
- Methods: the inverse-square cosine law and the integrating-sphere interreflection relation (Sumpner); recommended light levels after EN 12464-1 and the IES Lighting Handbook ranges.

# Actor input Schema

## `requests` (type: `array`):

One room per entry, as a line of text or an object. Size: '10 x 8 m', '15 x 12 ft' or '300 sq ft'; ceiling height ('9 ft ceiling'); 'mounted at 9 m' for hanging luminaires. Target: '500 lux', '50 fc', or the room type (office, classroom, kitchen, bedroom, warehouse, retail, workshop, corridor and 50 more). Luminaire: a preset (2x2 panel, 2x4 troffer, 4 ft tube, strip, 6 inch or 4 inch downlight, recessed can, high bay, low bay, 60W equivalent bulb, pendant, track, spot) or its lumens and watts ('4000 lm 30 W'), 'beam angle 60'. To check a layout instead: 'with 4 panels', '3 rows of 4'. Optional: 'reflectances 80/50/20', 'dark walls', 'maintenance factor 0.7', 'uniformity 0.6', 'work plane 0.85 m'. Object fields: length, width, area, ceilingHeight, mountingHeight, workPlane, target, space, fixture, lumens, watts, lamps, beamAngle, uplight, fixtures, rows, columns, reflectances, maintenance, uniformity, units, title, text.

## `units` (type: `string`):

For sizes and targets written without a unit. ft or fc in a request switch it to US units.

## `charts` (type: `boolean`):

An illuminance map of the work plane with the luminaires on it.

## Actor input object example

```json
{
  "requests": [
    "office 10 x 8 m, 3 m ceiling, 2x2 LED panels 3600 lm 32 W, 500 lux",
    "how many 6 inch downlights for a 15 x 12 ft kitchen with 8 ft ceilings",
    "warehouse 60 x 30 m, high bays 20000 lm 150 W mounted at 9 m, 200 lux",
    "classroom 30 x 25 ft, 9 ft ceiling, 2x4 troffers",
    "bedroom 12 x 11 ft with 2 60W equivalent bulbs",
    {
      "length": "8 m",
      "width": "6 m",
      "ceilingHeight": "3 m",
      "target": 300,
      "lumens": 4000,
      "watts": 30,
      "beamAngle": 90,
      "reflectances": [
        80,
        50,
        20
      ]
    }
  ],
  "units": "metric",
  "charts": true
}
```

# Actor output Schema

## `results` (type: `string`):

One row per request: the summary and chart.

## `output` (type: `string`):

The OUTPUT record: every result in one JSON object.

## `files` (type: `string`):

Charts (PNG and SVG) and Markdown reports in the run's key-value store.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "requests": [
        "office 10 x 8 m, 3 m ceiling, 2x2 LED panels 3600 lm 32 W, 500 lux",
        "how many 6 inch downlights for a 15 x 12 ft kitchen with 8 ft ceilings",
        "warehouse 60 x 30 m, high bays 20000 lm 150 W mounted at 9 m, 200 lux",
        "classroom 30 x 25 ft, 9 ft ceiling, 2x4 troffers",
        "bedroom 12 x 11 ft with 2 60W equivalent bulbs",
        {
            "length": "8 m",
            "width": "6 m",
            "ceilingHeight": "3 m",
            "target": 300,
            "lumens": 4000,
            "watts": 30,
            "beamAngle": 90,
            "reflectances": [
                80,
                50,
                20
            ]
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jumblemog/lighting-calculator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "requests": [
        "office 10 x 8 m, 3 m ceiling, 2x2 LED panels 3600 lm 32 W, 500 lux",
        "how many 6 inch downlights for a 15 x 12 ft kitchen with 8 ft ceilings",
        "warehouse 60 x 30 m, high bays 20000 lm 150 W mounted at 9 m, 200 lux",
        "classroom 30 x 25 ft, 9 ft ceiling, 2x4 troffers",
        "bedroom 12 x 11 ft with 2 60W equivalent bulbs",
        {
            "length": "8 m",
            "width": "6 m",
            "ceilingHeight": "3 m",
            "target": 300,
            "lumens": 4000,
            "watts": 30,
            "beamAngle": 90,
            "reflectances": [
                80,
                50,
                20,
            ],
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("jumblemog/lighting-calculator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "requests": [
    "office 10 x 8 m, 3 m ceiling, 2x2 LED panels 3600 lm 32 W, 500 lux",
    "how many 6 inch downlights for a 15 x 12 ft kitchen with 8 ft ceilings",
    "warehouse 60 x 30 m, high bays 20000 lm 150 W mounted at 9 m, 200 lux",
    "classroom 30 x 25 ft, 9 ft ceiling, 2x4 troffers",
    "bedroom 12 x 11 ft with 2 60W equivalent bulbs",
    {
      "length": "8 m",
      "width": "6 m",
      "ceilingHeight": "3 m",
      "target": 300,
      "lumens": 4000,
      "watts": 30,
      "beamAngle": 90,
      "reflectances": [
        80,
        50,
        20
      ]
    }
  ]
}' |
apify call jumblemog/lighting-calculator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jumblemog/lighting-calculator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/BvGfnunxcA87gii18/builds/2ZAir22u08XDcbfsk/openapi.json
