Gyre Technology Home

Networked solutions for a networked world 

Gyre Technology Home
services client login news and articles about us contact us

Home > Products > Lens Calculator

Lens Calculator

The Lens Calculator is a graphical tool to display the angle of view of any given lens and sensor combination. It is easy to customise, and adding or removing lenses and sensors to the tool requires no technical knowledge. See configuration (below) for more details on this.

The angle of view of a lens depends on the focal length of the lens, and on the size of the sensor (or film) upon which the image is being projected. This lens calculator works out the angle of view for any lens/sensor combination at the moment a user makes a selection, and the result is drawn on the adjacent graph.

The lens calculator has applications from photography to security, and can be used with most types of lenses and sensors (including digital cameras, film cameras, CCTV CCDs etc). It is even compatible with zoom lenses, displaying both the wide and the telephoto lengths at the same time.


Click on a picture (right) to open a demo.

The demonstrations to the right show LensCalc Pro and LensCalc SE. These two calculators are similar; the only difference being that the Pro edition can load multiple lens/sensor catalogues. See feature 9 in the list below for further details.

Lens Calculator Pro v1.2

LensCalc Pro v1.2

Lens Calculator SE v1.2

LensCalc SE v1.2


Lens Calculator Features

  1. Displays the angle and field of view of any given lens/sensor combination.
  2. Compatible with any type of lens, including photographic prime and zoom lenses, CCTV lenses, and video cameras.
  3. Compatible with any type of sensor, including photographic film and CCD sensors used in digital cameras, video cameras and CCTV security cameras.
  4. All information for the lens calculator is loaded from XML configuration files. This means that they can be easily changed by you with a simple text editor - no need to recompile the source code. See configuration for more.
  5. As the different sensors have slightly different aspect ratios, the "35mm equivalent lens" is calculated using the diagonal measurement of the current sensor against that of 35mm film. (Note: this feature may be turned off if it is not appropriate to your application.)
  6. Angle of view is displayed in degrees and minutes. There are 60 minutes in a degree, and 360 degrees in a full circle. The notation 96°43' means 96 degrees, 43 minutes.
  7. Field of view is calculated based on a given sensor/lens combination, and a user-selectable distance to subject. The distance to subject choices can be specified by you via a text-based configuration file.
  8. The lens calculator can be tied directly into your own product database, enabling users to visit the selected lens's specification directly from the calculator (via a hyperlink, for example).
  9. The calculator comes in three forms: (1) the Standard Edition (SE), (2) the Professional Edition (Pro), and (3) the Lite Edition:
    • "Pro Edition" allows you to load multiple catalogues into the calculator (this is useful for retailers, who may wish to display products from different manufacturers in different catalogues, or who wish to group together compatible components).
    • The "Standard Edition" will only display one catalogue (useful for lens manufacturers).
    • The "Lite Edition" is a very basic calculator with no GUI interface (drop down menus and lists). All interaction with the calculator is done via JavaScript from the web page. This is suitable for special applications only.



Data for the calculator comes from two XML (text) file:

  1. Configuration File
    The configuration file tells the calculator where to look for the catalogue files (see below), and it used to specify distances for the distance-to-subject value.
  2. Catalogue File
    Catalogue files contain all the data about the lenses and sensors. The calculator can load multiple catalogues, enabling you to display lenses and sensor collections that are related.

Configuration and Catalogue files are simple XML files that you can edit yourself with notepad or a similar text editor. This means you can use the calculator to display your own data (i.e. your own lenses and your own sensors), and you can modify it as and when you need to without our involvement.

Example catalogue:

<?xml version="1.0"?> <!-- BASIC CANON CATALOGUE --> <CONFIG> <LENSES> <LENS model="EF 16-35mm f/2.8L USM" wide="16" tele="35" /> <LENS model="EF 17-40mm f/4L USM" wide="17" tele="40" /> </LENSES> <SENSORS> <SENSOR type="35mm film" width="36" height="24" /> <SENSOR type="Canon EOS 1DS" width="35.8" height="23.8" /> </SENSORS> </CONFIG>

From the example above, you can see that the configuration file is broken into two sections: 'LENSES' and 'SENSORS'.

The LENSES section is made up of multiple LENS entries, and these define the properties for each lens that is displayed in the calculator (name and focal length(s)). Similarly, the SENSORS section is made up of multiple SENSOR entries, which define the properties for each sensor (name, width and height).


The actual data that is displayed (lenses and sensors) is contained in a plain text file that is read in by the calculator when loaded into a web browser. This means that you can easily modify it as your products change. See Configuration (above) for more details on this aspect of customisation.

In terms of look and feel and product linkage, the calculator is fully customisable too. We are quite happy to modify the calculator to meet your individual needs, so if you have specific requirements, please feel free contact Gyre to discuss the possibilities.

Installation and Setup

The calculator runs entirely within the client web browser. There is no server-side code to execute, and no additional software is required for you to use it. To install the calculator on your web site just copy the required files onto your web server and you are ready to go!

Full details on installation will be provided with your copy of the lens calculator.

See also: About the lens calculator

For more information about Gyre Technology or any of the products and services offered, please contact Jenny Thomas using this contact form.