Roof Tile Calculator — Android App (Java)
Tile roof construction calculator, with support for:
Type of cover: gable or hip
System of measures: metric (m, cm) or English/imperial (ft, in)
Interface language: Bulgarian, English, French, German, Spanish
— selected inside the application (Spinner), regardless of the system
device language, and is remembered between starts
How the calculation works
The roof is modeled with a common roof profile:
Length of the slope (rafter)= (shorter side of base / 2) / cos(slope)
Total roof area= 2 × (longer side × length of slope)
— this formula is equally valid for both gable and symmetrical
a four-pitched roof with the same slope on all slopes (provably
geometrically: the "lost" area of the gables in the gable roof
is exactly compensated by the additional triangular slopes at
the four-pitched one).
For a hipped roof, it is also shownthe length of the ridge
(0 if the roof is a full pyramid): billo = |long side − short side|
Effective area of one tile= (width − horizontal overlap) × (height − vertical overlap)
Number of tiles= (total area / effective area) × (1 + waste reserve), rounded up
— by default, the reserve is 15% for a four-pitched roof (more cutting at the ridges) and 10% for a two-pitched roof
Estimated price= number of tiles × price of tile
All internal calculations are performed in the metric system; when selected
imperial system input values are converted to meters/centimeters
before the calculation, and the results back to ft/sq ft for display.
Functionalities
Entering tile dimensions, slope and parameters, with units of measurement
according to the selected system
Optional: deduction of area for chimneys and dormers (number × width ×
height for each type), subtracted from the total area before calculating the
number of tiles — the result card shows gross area, deduction and
net area to cover when deduction is greater than 0
Visualization (`RoofView`): front view for a gable roof,
plan (top) with ridge lines and the four slopes for a hipped roof
Calculation history saved locally via SQLite (`DatabaseHelper`),
displayed in the currently selected units of measurement and language
Export history as CSV(`CsvExporter`) — "Export CSV" button
in the History screen opens the system sharing dialog (email, Drive,
Files, etc.) with a generated `.csv` file containing all saved
calculations with all raw values in metric system
Full localization in 5 languages (`values`, `values-bg`, `values-fr`,
`values-de`, `values-es`)
Project structure
app/src/main/java/com/iigtechnology/rooftilecalculator/
├── MainActivity.java — main screen: input, calculation, choices
├── RoofCalculation.java — model with formulas (metric, internal)
├── RoofView.java — custom View: gable elevation / hip plan
├── Units.java — metric ⇄ imperial conversions
├── LocaleHelper.java — implementing a selected language within the application
├── DatabaseHelper.java — SQLite history storage
├── CsvExporter.java — generate and share CSV with history
└── HistoryActivity.java — list of previous calculations + export
Tile roof construction calculator, with support for: Type of cover: gable or hip